module RSpec::Matchers

Public Instance Methods

include_an_object(expected) click to toggle source

Passes if the provided matcher passes when checked against any element of the collection.

@example

expect([1, 4, 5]).to include_an_object be_odd

@note You can also use this with compound matchers as well.

@example

expect([1, 4, 'a']).to include_an_object( be_odd.and be_an(Integer) )
# File lib/aruba/matchers/collection/include_an_object.rb, line 118
def include_an_object(expected)
  ::Aruba::Matchers::IncludeAnObject.new(expected)
end