Class: RSpec::Expectations::LegacyMatcherAdapter::RSpec1 Private
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
RSpec::Expectations::LegacyMatcherAdapter
|
Defined in: | rspec-expectations/lib/rspec/expectations/handler.rb |
Overview
Before RSpec 1.2, the failure message protocol was:
* { }
* { }
Class Method Summary
-
.interface_matches?(matcher) ⇒ Boolean
Internal use only
Note: #failure_message is part of the
::RSpec
3 protocol (paired with #failure_message_when_negated), so we don’t check for #failure_message here.
::RSpec::Expectations::LegacyMatcherAdapter
- Inherited
::RSpec::Matchers::MatcherDelegator
- Inherited
Instance Attribute Summary
::RSpec::Matchers::MatcherDelegator
- Inherited
Instance Method Summary
- #failure_message Internal use only
- #failure_message_when_negated Internal use only
::RSpec::Matchers::MatcherDelegator
- Inherited
::RSpec::Matchers::Composable
- Included
#& | Alias for Matchers::Composable#and. |
#=== | Delegates to |
#and | Creates a compound |
#description_of | Returns the description of the given object in a way that is aware of composed matchers. |
#or | Creates a compound |
#values_match? | This provides a generic way to fuzzy-match an expected value against an actual value. |
#| | Alias for Matchers::Composable#or. |
#should_enumerate? | We should enumerate arrays as long as they are not recursive. |
#surface_descriptions_in | Transforms the given data structure (typically a hash or array) into a new data structure that, when |
#unreadable_io?, | |
#with_matchers_cloned | Historically, a single matcher instance was only checked against a single value. |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RSpec::Matchers::MatcherDelegator
Class Method Details
.interface_matches?(matcher) ⇒ Boolean
Note: #failure_message is part of the ::RSpec
3 protocol (paired with #failure_message_when_negated), so we don’t check for #failure_message here.
# File 'rspec-expectations/lib/rspec/expectations/handler.rb', line 168
def self.interface_matches?(matcher) !matcher.respond_to?(: ) && matcher.respond_to?(: ) end
Instance Method Details
#failure_message
[ GitHub ]# File 'rspec-expectations/lib/rspec/expectations/handler.rb', line 157
def base_matcher. end
#failure_message_when_negated
[ GitHub ]# File 'rspec-expectations/lib/rspec/expectations/handler.rb', line 161
def base_matcher. end