I believe the expectation matchers also now support === in RSpec 3. So you could write it as:
it "works using expectation matcher" do
expect{ |b| Foo.new(&b) }.to yield_with_args instance_of Foo
end
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/2fea7ccd-d18b-48c4-a47b-aa1baa7c307f%40googlegroups.com.--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
I believe the expectation matchers also now support === in RSpec 3.But it tests only the yield argument type, not the object identity.
Ah good, thanks for the correction
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/4f0ef1ac-065b-4e31-ac22-a986ac126f8e%40googlegroups.com.