Sha256: 045c347bb034a647d18351dac5e21831fe45551de7def704dad9758133aa24d5
Contents?: true
Size: 612 Bytes
Versions: 30
Compression:
Stored size: 612 Bytes
Contents
module AuthMacros def log_in(attributes = {}) @_current_lines_user = FactoryGirl.create(:user, attributes) visit lines.login_path fill_in "Email", with: @_current_lines_user.email fill_in "Password", with: @_current_lines_user.password click_button "Login" page.should have_content "Logged in" end def authorize(attributes = {}) @current_lines_user = FactoryGirl.create(:user, attributes) controller.stub(:current_lines_user).and_return(@current_lines_user) controller.stub(:authorize).and_return(true) end def current_lines_user @current_lines_user end end
Version data entries
30 entries across 30 versions & 1 rubygems