| Class | Uttk::Strategies::RMatch |
| In: |
lib/uttk/strategies/RMatch.rb
|
| Parent: | Proxy |
I can be used with to test a test strategy. I will be merged soon with the Test strategy.
# File lib/uttk/strategies/RMatch.rb, line 52 def assertion if @errors_must_match.empty? and @errors_must_not_match.empty? pass else unless @errors_must_match.empty? @log.some_wanted_paths_are_missing = @errors_must_match end unless @errors_must_not_match.empty? @log.some_unwanted_paths_are_present = @errors_must_not_match end fail end end
Methods
# File lib/uttk/strategies/RMatch.rb, line 20 def prologue super @errors_must_match = @match.dup @errors_must_not_match = [] prefix = @log.path.to_regex_path_string @log.debug { @log.prefix = prefix ; nil } c = Class.new(Filters::RPathFilter) c.include Concrete @match.each do |rpath| c.match prefix + rpath do |filter, path| @errors_must_match.delete rpath c.disable_matcher() end end @dont_match.each do |rpath| c.match prefix + rpath do |filter, path| @errors_must_not_match << rpath c.disable_matcher() end end @c_filter = c.new @log.add_observer(@c_filter) create @test end