Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Given /^a user is logged in as "(.*)"$/ do |login|
- @current_user = User.create!(
- :login => login,
- :password => 'generic',
- :password_confirmation => 'generic',
- :email => "#{login}@example.com"
- )
- # :create syntax for restful_authentication w/ aasm. Tweak as needed.
- @current_user.register!
- @current_user.activate!
- visit "/login"
- fill_in("login", :with => login)
- fill_in("password", :with => 'generic')
- click_button("Login")
- response.body.should =~ /Logged/
- end
Add Comment
Please, Sign In to add comment