Method: RSpec::Matchers::AliasedMatcher#method_missing
- Defined in:
- lib/rspec/matchers/aliased_matcher.rb
#method_missing ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Forward messages on to the wrapped matcher.
Since many matchers provide a fluent interface
(e.g. a_value_within(0.1).of(3)), we need to wrap
the returned value if it responds to description,
so that our override can be applied when it is eventually
used.
24 25 26 27 28 |
# File 'lib/rspec/matchers/aliased_matcher.rb', line 24 def method_missing(*) return_val = super return return_val unless RSpec::Matchers.is_a_matcher?(return_val) self.class.new(return_val, @description_block) end |