I'm trying to write a unit test whereby a particular method is expected to be called with a single argument of a specific class.
Something like:
expect(subject).to respond_to(:method1).with(instance_of(Class1))
I know I can expect a single argument with respond_to(:method1).with(1).argument, but how can I also expect its class?
Aucun commentaire:
Enregistrer un commentaire