[rspec-users] Do message expectations work in story steps?
rick.denatale at gmail.com
Sun May 4 20:39:28 EDT 2008
I've never tried to use them myself, but another list member brought
this up in another thread.
He was using a message expectation in a story step, and couldn't get it to fail.
Looking at what he was doing, it didn't look to me that it would ever
succeed, which got me thinking.
Message expectations are implemented in rspec by asking the mock
framework to verify them after each example by calling
This seems to be the only place where this is called, so I've got my
doubts that message expectations ever get verified when a story is
Now, it's not clear just when in a story a message expectation should
be tested, and it's probably the case that they shouldn't be
used/supported in stories.
If so should this be documented somewhere, or is it already?
My blog on Ruby
More information about the rspec-users