Class: RSpec::Expectations::BlockExpectationTarget
- Inherits:
-
ExpectationTarget
- Object
- ExpectationTarget
- RSpec::Expectations::BlockExpectationTarget
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/expectation_target.rb
Overview
Validates the provided matcher to ensure it supports block expectations, in order to avoid user confusion when they use a block thinking the expectation will be on the return value of the block rather than the block itself.
Constant Summary
Constants inherited from ExpectationTarget
ExpectationTarget::UndefinedValue
Instance Attribute Summary
Attributes inherited from ExpectationTarget
Instance Method Summary collapse
- #not_to(matcher, message = nil, &block) ⇒ Object (also: #to_not)
- #to(matcher, message = nil, &block) ⇒ Object
Methods inherited from ExpectationTarget
Constructor Details
This class inherits a constructor from RSpec::Expectations::ExpectationTarget
Instance Method Details
#not_to(matcher, message = nil, &block) ⇒ Object Also known as: to_not
142 143 144 145 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/expectation_target.rb', line 142 def not_to(matcher, =nil, &block) enforce_block_expectation(matcher) super end |
#to(matcher, message = nil, &block) ⇒ Object
137 138 139 140 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/expectation_target.rb', line 137 def to(matcher, =nil, &block) enforce_block_expectation(matcher) super end |