In rspec, you can verify that a method call receives an argument, which is a hash, and includes certain keys or key-value pairs. I.e:
my_object.should_receive(:my_method).with(hash_including(:a => 'alpha'))
Is there anything available to do a similar match with an array? Anything that will look like?
my_object.should_receive(:my_method).with(array_including('alpha'))
source share