* David Chelimsky [2011-08-22]:
> This means that you need to explicitly stub the load method to do what
> you're trying to do:
>
>   let(:bar) { mock(Bar, :load => nil).as_null_object }

Thanks for the explanation, David. I wasn't sure whether or not this was
accepted behaviour, I would have expected a null object to be, well, an
object without methods. At least the next guy's google search will point
to the solution. :)

cheers,

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

Reply via email to