about summary refs log tree commit diff
path: root/spec/features
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-06-01 00:09:17 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-31 17:09:17 +0200
commit41fa53253c09f70f4830e10b86d51d5dfb0b5fa9 (patch)
treeb294335ce2c883d05f5dd79234270b1b5fe83acd /spec/features
parentc00ead8a72dd738013b8a132eff7de4959e59670 (diff)
Keep ENV['LOCAL_HTTPS'] with ApplicationControllerSpec (fix random fail) (#3479)
* Keep ENV['LOCAL_HTTPS'] with ApplicationControllerSpec (fix random fail)

* use climate_control
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/log_in_spec.rb9
1 files changed, 6 insertions, 3 deletions
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