[rspec-devel] Specs for problems involving interop with other mocking frameworks

David Chelimsky dchelimsky at gmail.com
Wed Jan 6 18:13:52 EST 2010

On Wed, Jan 6, 2010 at 1:33 PM, Matt Patterson
<matt-lists at reprocessed.org>wrote:

> Hi all,
> I'm trying to write a failing spec for a problem which only occurs when
> mocking under Mocha (and potentially the other non-rspec frameworks) in
> rspec-rails.

I saw your lighthouse ticket about this, and I'm a bit confused about what
you're trying to achieve. Mocha does not have a should_receive method, so if
you're using mocha, you shouldn't expect should_receive to work. Ideally
you'd get a NoMethodError on should_receive, but if there's anything that's
loading spec/mocks, should_receive will be defined.

Can you help me understand the use case?

> I'm not sure what the best way to deal with this is. Ideally, I'd just
> re-run the existing RenderObserver-related specs in
> spec/rails/example/view_example_group_spec.rb and the whole
> spec/rails/matchers/render_template_spec.rb under Mocha, but I'm not sure
> what the best way to do that is. I mean, I could just `load` the files in
> and monkey with the config before running them probably through a cuke
> feature, but that seems kind of icky.
> Suggestions gratefully received.
> Matt
> --
>  Matt Patterson | Design & Code
>  <matt at reprocessed org> | http://www.reprocessed.org/
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-devel/attachments/20100106/09eab90a/attachment.html>

More information about the rspec-devel mailing list