DEV: Automatically require 'rails_helper' in all specs (#16077)

It's very easy to forget to add `require 'rails_helper'` at the top of every core/plugin spec file, and omissions can cause some very confusing/sporadic errors.

By setting this flag in `.rspec`, we can remove the need for `require 'rails_helper'` entirely.
This commit is contained in:
David Taylor
2022-03-01 17:50:50 +00:00
committed by GitHub
parent 9415ec91a1
commit c9dab6fd08
815 changed files with 1 additions and 1487 deletions

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe DiscourseNarrativeBot::AdvancedUserNarrative do
fab!(:narrative_bot) { ::DiscourseNarrativeBot::Base.new }
fab!(:discobot_user) { narrative_bot.discobot_user }

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require 'rails_helper'
describe DiscourseNarrativeBot::NewUserNarrative do
fab!(:welcome_topic) { Fabricate(:topic, title: 'Welcome to Discourse') }
fab!(:narrative_bot) { ::DiscourseNarrativeBot::Base.new }

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require 'rails_helper'
describe DiscourseNarrativeBot::Store do
describe '.set' do
it 'should set the right value in the plugin store' do

View File

@ -1,7 +1,5 @@
# frozen_string_literal: true
require 'rails_helper'
describe DiscourseNarrativeBot::TrackSelector do
let(:user) { Fabricate(:user) }
let(:narrative_bot) { ::DiscourseNarrativeBot::Base.new }