On Jan 13, 2008 6:56 AM, Ivo Dancet <[EMAIL PROTECTED]> wrote:
> Hi all, I have a method calling Klass.create! two times with different
> arguments (this happens in a class reponsable for reading in a csv file)
>
> I want to test those like this:
>
> in one test: Klass.should_receive(:create!).with(:name => "foo").once
> in another: Klass.should_receive(:create!).with(:name => "foo2").once
>
> This doesn't work because the 'once' is only about the create! call,

Actually, that should work. 'once' is about the complete expectation
including the arguments. If this isn't working you've uncovered a bug.
Please report it to the lighthouse (http://rspec.lighthouseapp.com)
with specific examples we can run and the output you're getting.

Thanks,
David

> it doesn't use the arguments to make the call unique. Can I make this
> work another way (not only should_receive(:create!).twice, I want to
> test the arguments).
>
> Thanks for any feedback.
>
> Ivo
>
>
> _______________________________________________
> 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