Ruby on Rails
Wednesday, June 29, 2011
Thank you very much! So I guess it was a simple issue.
But what would I do for the form_for @user_session? I tried...
before(:each) do
assign(:user_session, mock_model("UserSession").as_new_record)
end
But that returns the error:
Failure/Error: assign(:user_session, mock_model("UserSession").as_new_record)
ArgumentError:
The mock_model method can only accept as its first argument:
* A String representing a Class that does not exist
* A String representing a Class that extends ActiveModel::Naming
* A Class that extends ActiveModel::Naming
It received UserSession
Is this because I'm using Authlogic and the UserSession model extends Authlogic::Session::Base? How would I work around this?
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/2fm7vc17WjgJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment