about summary refs log tree commit diff
path: root/spec/features
diff options
context:
space:
mode:
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