[rspec-users] [Mock]How do I check order of method argument ?

Pat Maddox patmaddox at me.com
Sat Dec 18 07:01:26 EST 2010


    mock.should_receive(:write).with("\n").ordered

Append .ordered as above



On Dec 17, 2010, at 6:12 AM, "niku -E:)" <niku at niku.name> wrote:

> Hello.
> My name is niku.
> 
> I'm using rspec 2.2.1
> 
> /tmp% rspec --version
> 2.2.1
> 
> I tested http://gist.github.com/744935 and passed.
> 
> /tmp% rspec stdout_spec.rb
> ..
> 
> Finished in 0.00105 seconds
> 2 examples, 0 failures
> 
> But I expected test fail.
> Because It's wrong order that argument of 'write' method.
> 
> How do I check order of argument ?
> 
> regards.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20101218/2de56348/attachment-0001.html>


More information about the rspec-users mailing list