[rspec-users] Adding Test Spy into Rspec mocking framework

Brian Takita brian.takita at gmail.com
Mon Sep 15 21:31:48 EDT 2008


On Mon, Sep 15, 2008 at 9:54 AM, Joseph Wilk <lists at ruby-forum.com> wrote:
>>Doesn't RR already support test spy?
> I don't believe so. There is nothing on the github page or anything I
> can spot in the current code in git. The github docs do mention it as
> something they are aiming to do.
No, spies have not been implemented yet on RR.
>
>> o = stub("stub", :foo => true)
>> o.foo
>> o.should have_received(:foo)
Thats pretty nice.
>
> That sounds really interesting Pat. Is is something that's living in
> github? I would be interested to see what you are coming up with when
> you get a chance to let it out into the wild.
>
>>Now with all of that said, I think this is worth exploring. I'm just
>>not sure that exploration should occur in Rspec proper. What I'd
>>encourage you to do is write either a standalone library with hooks
>>that you can exploit from Rspec examples and/or rspec/cucumber
>>scenarios or write an extension library for Rspec's mocking framework.
>
> Thanks for the feedback. I'll take a look at making it something outside
> of Rspec as you suggested. I'll notify the mailing list of any progress
> I make.
>
> To follow on from David's link you can see the slides from agile 2008
> where Mockito makes an introduction
> http://szczepiq.files.wordpress.com/2008/08/dont-give-up-on-mocking.pdf
>
> And from the creator of mockito
> http://monkeyisland.pl/2008/01/14/mockito/
> (whose URL brings back good old memories.)
>
> Have a good evening/morning/afternoon,
> --
> Joseph Wilk
> http://www.joesniff.co.uk
Brian
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list