Created
July 5, 2011 16:50
-
-
Save ecavazos/1065248 to your computer and use it in GitHub Desktop.
Include acceptance helper methods into request specs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module AcceptanceHelper | |
| def sign_in(user=Factory.create(:user)) | |
| visit new_user_session_path | |
| fill_in 'user_email', :with => user.email | |
| fill_in 'user_password', :with => user.password | |
| click_button 'Sign in' | |
| end | |
| end | |
| RSpec.configure do |config| | |
| config.include AcceptanceHelper, :type => :request | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment