Class: Spec::Matchers::AutotestMappingMatcher
- Defined in:
- lib/vendor/plugins/rspec/spec/autotest/autotest_matchers.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(specs) ⇒ AutotestMappingMatcher
constructor
A new instance of AutotestMappingMatcher.
- #matches?(autotest) ⇒ Boolean
- #to(file) ⇒ Object
Constructor Details
#initialize(specs) ⇒ AutotestMappingMatcher
Returns a new instance of AutotestMappingMatcher.
4 5 6 |
# File 'lib/vendor/plugins/rspec/spec/autotest/autotest_matchers.rb', line 4 def initialize(specs) @specs = specs end |
Instance Method Details
#failure_message ⇒ Object
19 20 21 |
# File 'lib/vendor/plugins/rspec/spec/autotest/autotest_matchers.rb', line 19 def "expected #{@autotest.class} to map #{@specs.inspect} to #{@file.inspect}\ngot #{@actual.inspect}" end |
#matches?(autotest) ⇒ Boolean
13 14 15 16 17 |
# File 'lib/vendor/plugins/rspec/spec/autotest/autotest_matchers.rb', line 13 def matches?(autotest) @autotest = prepare(autotest) @actual = autotest.test_files_for(@file) @actual == @specs end |
#to(file) ⇒ Object
8 9 10 11 |
# File 'lib/vendor/plugins/rspec/spec/autotest/autotest_matchers.rb', line 8 def to(file) @file = file self end |