Module: RSpec::ChangeToNow::Matchers::DSL::Detect
- Included in:
- RSpec::ChangeToNow::Matchers::DSL
- Defined in:
- lib/rspec/change_to_now/matchers/dsl.rb
Instance Method Summary collapse
-
#detect(*expected, &block) ⇒ Object
If given a block, passes if the block returns a truthy value for any of the actual items or for the key-value pair is the actual item list is a hash.
Instance Method Details
#detect(*expected, &block) ⇒ Object
If given a block, passes if the block returns a truthy value for any of the actual items or for the key-value pair is the actual item list is a hash. Without a block, it behaves identically to include
. expected
must be empty if a block is provided.
30 31 32 |
# File 'lib/rspec/change_to_now/matchers/dsl.rb', line 30 def detect(*expected, &block) RSpec::ChangeToNow::Matchers::Detect.new(*expected, &block) end |