I would like to know if the mock framework will be deprecated, since I
have a pair of feature requests, and I don't know where to request
them:

1) Alternative expectations:

mock.should_receive(:save).
  and_return(false).
  or_receive(:save!).
  and_raise(ActiveRecord::RecordNotSaved)

2) Chained stubs/expectations

mock.stub!(:valid?).and_return(false)
mock.stub!(:valid?).and_return(true).after_receiving(:save).and_return(true)

I'm sure that this needs no more explanation :)

On 9/3/07, Zach Dennis <[EMAIL PROTECTED]> wrote:
> On 9/2/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> > I think that makes sense.
> >
> > Which do you recommend? Flexmock or Mocha?
> >
>
> I wouldn't recommend either of them by themselves, at least the
> current way they sit.
>
> Jim Weirich may be adding globally ordered strict mocks, which if he
> does then I think Flexmock will be the first mocking library in ruby
> to cover all mocking needs (as far as I know).
>
> Mocha (and RSpec mocks too) don't support globally strict ordered
> mocks. Hardmock is another mocking library which is just strict
> mocking (no stubs, no partial mocks). Right now I prefer Mocha +
> Hardmock, but I'm eagerly awaiting to see if Flexmock gets globally
> strict ordered mocks.
>
> Zach Dennis
> http://www.continuousthinking.com
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>



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

Reply via email to