about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-02-18 16:59:00 -0500
committerGitHub <noreply@github.com>2023-02-19 06:59:00 +0900
commitc0d7c855b3f6865f16c909e803093cebbc3bd709 (patch)
tree7b7e06a86351f6a06836dbd52b31025682efa7f6 /spec
parent08289a38fa787694cb1c94292bd60b119a906315 (diff)
Autofix Rubocop RSpec/Capybara/FeatureMethods (#23708)
Diffstat (limited to 'spec')
-rw-r--r--spec/features/log_in_spec.rb22
-rw-r--r--spec/features/profile_spec.rb14
2 files changed, 18 insertions, 18 deletions
diff --git a/spec/features/log_in_spec.rb b/spec/features/log_in_spec.rb
index de1a6de03..329cdf34c 100644
--- a/spec/features/log_in_spec.rb
+++ b/spec/features/log_in_spec.rb
@@ -2,21 +2,21 @@
 
 require 'rails_helper'
 
-feature 'Log in' do
+describe 'Log in' do
   include ProfileStories
 
-  given(:email)        { "test@example.com" }
-  given(:password)     { "password" }
-  given(:confirmed_at) { Time.zone.now }
+  subject { page }
+
+  let(:email)        { "test@example.com" }
+  let(:password)     { "password" }
+  let(:confirmed_at) { Time.zone.now }
 
-  background do
+  before do
     as_a_registered_user
     visit new_user_session_path
   end
 
-  subject { page }
-
-  scenario 'A valid email and password user is able to log in' do
+  it 'A valid email and password user is able to log in' do
     fill_in 'user_email', with: email
     fill_in 'user_password', with: password
     click_on I18n.t('auth.login')
@@ -24,7 +24,7 @@ feature 'Log in' do
     is_expected.to have_css('div.app-holder')
   end
 
-  scenario 'A invalid email and password user is not able to log in' do
+  it 'A invalid email and password user is not able to log in' do
     fill_in 'user_email', with: 'invalid_email'
     fill_in 'user_password', with: 'invalid_password'
     click_on I18n.t('auth.login')
@@ -33,9 +33,9 @@ feature 'Log in' do
   end
 
   context do
-    given(:confirmed_at) { nil }
+    let(:confirmed_at) { nil }
 
-    scenario 'A unconfirmed user is able to log in' do
+    it 'A unconfirmed user is able to log in' do
       fill_in 'user_email', with: email
       fill_in 'user_password', with: password
       click_on I18n.t('auth.login')
diff --git a/spec/features/profile_spec.rb b/spec/features/profile_spec.rb
index ec4f9a53f..d1c6919c1 100644
--- a/spec/features/profile_spec.rb
+++ b/spec/features/profile_spec.rb
@@ -2,25 +2,25 @@
 
 require 'rails_helper'
 
-feature 'Profile' do
+describe 'Profile' do
   include ProfileStories
 
-  given(:local_domain) { ENV['LOCAL_DOMAIN'] }
+  subject { page }
+
+  let(:local_domain) { ENV['LOCAL_DOMAIN'] }
 
-  background do
+  before do
     as_a_logged_in_user
     with_alice_as_local_user
   end
 
-  subject { page }
-
-  scenario 'I can view Annes public account' do
+  it 'I can view Annes public account' do
     visit account_path('alice')
 
     is_expected.to have_title("alice (@alice@#{local_domain})")
   end
 
-  scenario 'I can change my account' do
+  it 'I can change my account' do
     visit settings_profile_path
 
     fill_in 'Display name', with: 'Bob'