Displaying 2 results from an estimated 2 matches for "argumentexpectations".
Did you mean:
argumentexpectation
2008 Mar 05
14
ActiveRecord, spec''ing find has right :order parameter
I''m wanting to write a spec that a model is applying an :order option
to a find call, but I don''t want to completely specify all of the find
parameters.
So I want to write something like this, say in a controller spec
User.should_receive(:find).with(:all, hash_with_at_least(:order =>
''user.name ASC''))
get ''index'', :sort =>
2007 Feb 15
17
Odd parameter munging with with()
Hi,
I have this setup block:
setup do
session[:login] = ''jhughes''
@user = mock("user")
User.stub!(:find).and_return(@user)
@params = {:cn => "Bilbo Baggins",
:telephoneNumber => "416-277-4418",
:mail => "bilbo at baggins.com"}
end
And then this spec:
specify "should update and save the