Test Spies for RSpec 2

I’ve tried three test spy mocking frameworks for RSpec that I know of.
Presently, all three (Not A Mock, RR, rspec-spies) don’t work with
RSpec 2.

Does anyone have a line on any other mocking frameworks for RSpec 2
that allow the AAA style to be supported?

I’m really hoping to not have to roll off everything I’ve learned and
put into practice about test/spec structure over the past four years
and fall back to traditional mocking. Any pointers to any hint of a
possible solution would be greatly helpful.

Many Thanks,
Scott

On Dec 2, 2010, at 1:44 AM, Scott Bellware wrote:

I’ve tried three test spy mocking frameworks for RSpec that I know of.
Presently, all three (Not A Mock, RR, rspec-spies) don’t work with
RSpec 2.

Have you contacted the maintainers of the projects that offer spies? I’m
a bit surprised they haven’t updated to support RSpec-2, which was in
beta since March (plenty of time for downstream libs to update).

Does anyone have a line on any other mocking frameworks for RSpec 2
that allow the AAA style to be supported?

I was only aware of those three.

I’m really hoping to not have to roll off everything I’ve learned and
put into practice about test/spec structure over the past four years
and fall back to traditional mocking. Any pointers to any hint of a
possible solution would be greatly helpful.

Have you considered contributing a patch to your preferred spy
extension? The frameworks they depend on (expectations and mocks) didn’t
really change in any significant way, so I doubt it would be that
complicated to get any of them working.

FWIW,
David

Scott, check out Bourne. It’s an add on to mocha that gives you
spies. I’m using it, and like it a lot.

If the idea of having to say 'stubs(:method)' for every method that you're going to call and verify, give my new mocking library Matahari a go: https://github.com/mortice/matahari

It’s brand new and deficient in many ways but I’m planning on improving
it and it sounds like we appreciate the same things about spies, so
maybe a good fit.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs