Skip to content

A platform for community discussion. Free, open, simple.

DEV: Remove `before(:all)` from RSpec suite

Loïc Guitautcc515e2c1ce5
diff --git a/Gemfile b/Gemfile
index c02b52abaca..b2116cc8ac3 100644
--- a/Gemfile
+++ b/Gemfile
@@ -170,7 +170,7 @@ group :test, :development do
gem 'shoulda-matchers', require: false
gem 'rspec-html-matchers'
gem 'byebug', require: ENV['RM_INFO'].nil?, platform: :mri
- gem "rubocop-discourse", require: false
+ gem 'rubocop-discourse', require: false, github: 'discourse/rubocop-discourse'
gem 'parallel_tests'
gem 'rswag-specs'
diff --git a/Gemfile.lock b/Gemfile.lock
index 65b1ebbf388..016f2fb31a9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -5,6 +5,14 @@ GIT
mail (2.8.0.edge)
mini_mime (>= 0.1.1)
+GIT
+ remote: https://github.com/discourse/rubocop-discourse.git
+ revision: 0de6d72891fea488cae22332505e4e3f26b4e157
+ specs:
+ rubocop-discourse (2.5.0)
+ rubocop (>= 1.1.0)
+ rubocop-rspec (>= 2.0.0)
+
GEM
remote: https://rubygems.org/
specs:
@@ -422,9 +430,6 @@ GEM
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.19.1)
parser (>= 3.1.1.0)
- rubocop-discourse (2.5.0)
- rubocop (>= 1.1.0)
- rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.12.1)
rubocop (~> 1.31)
ruby-prof (1.4.3)
@@ -612,7 +617,7 @@ DEPENDENCIES
rspec-rails
rss
rswag-specs
- rubocop-discourse
+ rubocop-discourse!
ruby-prof
ruby-readability
rubyzip
diff --git a/spec/helpers/redis_snapshot_helper.rb b/spec/helpers/redis_snapshot_helper.rb
index fd8f531b083..92d5be9cabd 100644
--- a/spec/helpers/redis_snapshot_helper.rb
+++ b/spec/helpers/redis_snapshot_helper.rb
@@ -2,14 +2,6 @@
module RedisSnapshotHelper
def use_redis_snapshotting
- before(:all) do
- RedisSnapshot.begin_faux_transaction
- end
-
- after(:all) do
- RedisSnapshot.end_faux_transaction
- end
-
before(:each) do
RedisSnapshot.begin_faux_transaction
end