lib/generators/voluntary/install/templates/features/support/user_cuke_helpers.rb in voluntary-0.0.3 vs lib/generators/voluntary/install/templates/features/support/user_cuke_helpers.rb in voluntary-0.1.0.rc1

- old
+ new

@@ -2,11 +2,11 @@ # creates a new user object from the factory with some default attributes # and the given override attributes, adds the standard aspects to it # and returns it def create_user(overrides={}) - Factory( + FactoryGirl.create( :user, { password: 'password', password_confirmation: 'password' }.merge(overrides) ) @@ -20,10 +20,10 @@ end # create a new @me user, if not present, and log in using the # integration_sessions controller (automatic) def automatic_login - @me ||= Factory(:user) + @me ||= FactoryGirl.create(:user) page.driver.visit(new_integration_sessions_path(user_id: @me.slug)) click_button "Login" end # use the @me user to perform a manual login via the sign_in page