Method: RSpec::Expectations::ExpectationTarget::InstanceMethods#to
- Defined in:
- lib/rspec/expectations/expectation_target.rb
#to(matcher = nil, message = nil, &block) ⇒ Boolean
Runs the given expectation, passing if matcher returns true.
63 64 65 66 |
# File 'lib/rspec/expectations/expectation_target.rb', line 63 def to(matcher=nil, =nil, &block) prevent_operator_matchers(:to) unless matcher RSpec::Expectations::PositiveExpectationHandler.handle_matcher(target, matcher, , &block) end |