I'm trying to test out that a method gets called with a custom Ruby object as an argument, and that that object has the correct attribute.
This is working right now:
expect(MyClass).to receive(:a_method).with(instance_of(SomeObject))
but I can't find anything about how to test the internals of SomeObject
I want something like:
expect(MyClass).to receive(:a_method).with(instance_of(SomeObject)).with_attribute(:name => "Bob")
but this throws a NoMethodError