Here is the scenario
Scenario: Successful login
Given an unauthenticated visitor
When visitor goes to /users/login
And fills in Email with: amitpandya
And fills in Password with: amitpandya
And clicks the Login button
Then amitpandya should be logged in
And page should include a notice with text: Welcome amitpandya
And amitpandya should see the home mypage page
now in steps file
When “$person logs in” do |user|
post_via_redirect “/users/login”, {:authenticator => {:username =>
user,
:password => “washington”}},{:https => ‘on’}
request.should_not be_ssl
request.session[:user_id].should == Person.find_by_username(user).id
end
working fine with cucumber-0.10.0 and cucumber-rails-0.3.2 but if I
upgrade
with cucumber-rails-1.2.1 or cucumber-rails-1.3.1 - at this line
request.session[:user_id].should == Person.find_by_username(user).id
I am getting bellow error.
Then amitpandya should be logged in #
features/step_definitions/session_steps.rb:11
wrong number of arguments calling request
(0 for 1) (ArgumentError)
./features/step_definitions/session_steps.rb:12:in /^(.*)\ should\ be\ logged\ in$/' features/login.feature:23:in
Then amitpandya should be logged in’
Any help How can I fix it?
Thank you.
With kind regards,
Amit Pandya