On Oct 11, 2009, at 6:21 AM, Lee Hambley wrote:

John,

I may well be wrong, but I believe it's just a `tag` or name, so when you print out <customer> - you see <#Double customer> rather tahn something inexplicable, that is at least how it appears to work using Mocha

Not so much when _you_ print it out, but when there is a failure and rspec prints out a failure message for you. This is actually explained in the book - on page 207 if you've got beta 10:

<snip>
To create a double, just use the double( ) method, like this:

thingamajig_double = double('thing-a-ma-jig')

The string argument is optional, but highly recommended as it is used in failure messages.
</snip>

- Lee
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to