From 41fa53253c09f70f4830e10b86d51d5dfb0b5fa9 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Thu, 1 Jun 2017 00:09:17 +0900 Subject: Keep ENV['LOCAL_HTTPS'] with ApplicationControllerSpec (fix random fail) (#3479) * Keep ENV['LOCAL_HTTPS'] with ApplicationControllerSpec (fix random fail) * use climate_control --- spec/features/log_in_spec.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'spec/features') diff --git a/spec/features/log_in_spec.rb b/spec/features/log_in_spec.rb index f9c222b60..6dc3cd2f4 100644 --- a/spec/features/log_in_spec.rb +++ b/spec/features/log_in_spec.rb @@ -1,11 +1,14 @@ require "rails_helper" feature "Log in" do - scenario "A valid email and password user is able to log in" do - email = "test@example.com" - password = "password" + given(:email) { "test@examle.com" } + given(:password) { "password" } + + background do Fabricate(:user, email: email, password: password) + end + scenario "A valid email and password user is able to log in" do visit new_user_session_path fill_in "user_email", with: email fill_in "user_password", with: password -- cgit