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