[rspec-users] problem with rspec_on_rails and @controller.should_receive(:render) in trunk
christoph.sturm at gmail.com
Thu Apr 19 19:51:09 EDT 2007
On 4/19/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> > The problem is really one of feedback, IMO. The mock should tell you
> > "hey, you said I should expect a single call w/ these args, but I got
> > another one with these other args". Right now it's not telling you
> > that your expectation was met AND there was a problem - just that
> > there was a problem.
> > Thoughts?
> Afterthought - the original post in this thread said that this problem
> appeared recently. I'm not 100% certain, but I think this is due to a
> recent change to how Spec::Rails deals with #rescue_action. It used to
> just catch everything. Now it lets you define the rescue_action in
> your controller specs and ensures that mock errors are not caught
> regardless of what you define. So rspec was actually hiding this
> problem from you in the past, but is now shining a light on it (as it
> should have all along). Make sense?
Yeah, I agree. If the error message could be fixed all should be good.
I think when an expectation failed jmock listed all the expectations
and stubs on that mock, and if they were met or not. I think something
like that would be great.
More information about the rspec-users