class UserStoriesTest < ActionController::IntegrationTest
test "some test" do
get "/"
assert_response :success
get "/"
assert_response :success
end
end
When I run the code above the first assertion passes. However, the
second assertion fails because the response is a 500. To be more
specific I get this error:
Expected response to be a <:success>, but was <500>
<"You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+">
Anyone have an explanation? I want to to test some going to the
homepage and then clicking on a link to the login page which is why I
am calling consecutive GET requests. Help me if I am going about it
the wrong way.
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.