Class: Spec::Example::ExampleMatcherSpecHelper::MatchDescription
- Defined in:
- lib/gems/rspec-1.1.11/spec/spec/example/example_matcher_spec.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(description) ⇒ MatchDescription
constructor
A new instance of MatchDescription.
- #matches?(matcher) ⇒ Boolean
- #negative_failure_message ⇒ Object
Constructor Details
#initialize(description) ⇒ MatchDescription
Returns a new instance of MatchDescription.
7 8 9 |
# File 'lib/gems/rspec-1.1.11/spec/spec/example/example_matcher_spec.rb', line 7 def initialize(description) @description = description end |
Instance Method Details
#failure_message ⇒ Object
15 16 17 |
# File 'lib/gems/rspec-1.1.11/spec/spec/example/example_matcher_spec.rb', line 15 def "expected matcher.matches?(#{@description.inspect}) to return true, got false" end |
#matches?(matcher) ⇒ Boolean
11 12 13 |
# File 'lib/gems/rspec-1.1.11/spec/spec/example/example_matcher_spec.rb', line 11 def matches?(matcher) matcher.matches?(@description) end |
#negative_failure_message ⇒ Object
19 20 21 |
# File 'lib/gems/rspec-1.1.11/spec/spec/example/example_matcher_spec.rb', line 19 def "expected matcher.matches?(#{@description.inspect}) to return false, got true" end |