Skip to content

Instantly share code, notes, and snippets.

@dvanderbeek
Last active August 29, 2015 14:05
Show Gist options
  • Save dvanderbeek/de9caad2ea12498c4ba7 to your computer and use it in GitHub Desktop.
Save dvanderbeek/de9caad2ea12498c4ba7 to your computer and use it in GitHub Desktop.
OLD - Devise Request Spec Helper
module ValidUserRequestHelper
def sign_in_as_a_valid_user
@user ||= FactoryGirl.create :user
post_via_redirect user_session_path, 'user[email]' => @user.email, 'user[password]' => @user.password
end
end
# spec_helper.rb
RSpec.configure do |config|
config.include ValidUserRequestHelper, :type => :request
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment