Testing Guide: Integration example confusion

Hi there,

I was following the integration testing guide (http://
guides.rubyonrails.org/testing.html#integration-testing) and I was
getting a bit mixed up with regards to redirect requests parameters.

Looking at the first example it has this line:
post_via_redirect "/login", :username => users(:avs).username,
     :password => users(:avs).password

But for me to get the parameters working I had to put them in a hash
like so:
post_via_redirect "/login", { :username => users(:avs).username,
    :password => users(:avs).password}

Mind you I'm new to rails, so it could well be my mistake.

Could it be the case that the code had some typo or something? Both
calls are equivalent, Ruby builds the hash for you in the first call.

Yup, you’re right. It must have been something else. Facepalm.