[rspec-devel] rspec stubbing

David Chelimsky dchelimsky at gmail.com
Tue Sep 26 23:06:39 EDT 2006


Hi everyone,

Brian contributed a patch with some kick-ass stubbing capability last
week. I've been playing w/ the syntax a bit, with an eye to making it
more rspec like:

Story.stub!(:new).with(value)

I was able to get this to work, but it wasn't exactly what I think we
need from rspec. I think what we really need is class level mocking -
just like the existing mocking framework:

Story.should_receive(:new).and_return(value)
Person.should_receive(:find).with("1").and_return(value)
etc.

Right now there are a ton of other features that we're waiting to
release until this gets settled. What I'd like to do is to yank the
stubbing from the trunk so we can release and then add it to a branch
in which we can play w/ syntax and functionality, moving towards
including it an 0.6.5 release.

That work for everyone?

David


More information about the rspec-devel mailing list