mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:01:20 +08:00
Add RSpec 4 compatibility (#17652)
* Remove outdated option
04078317ba
* Use the non-globally exposed RSpec syntax
https://github.com/rspec/rspec-core/pull/2803
* Use the non-globally exposed RSpec syntax, cont
https://github.com/rspec/rspec-core/pull/2803
* Comply to strict predicate matchers
See:
- https://github.com/rspec/rspec-expectations/pull/1195
- https://github.com/rspec/rspec-expectations/pull/1196
- https://github.com/rspec/rspec-expectations/pull/1277
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
describe DiscourseNarrativeBot::NewUserNarrative do
|
||||
RSpec.describe DiscourseNarrativeBot::NewUserNarrative do
|
||||
fab!(:welcome_topic) { Fabricate(:topic, title: 'Welcome to Discourse') }
|
||||
fab!(:narrative_bot) { ::DiscourseNarrativeBot::Base.new }
|
||||
fab!(:discobot_user) { narrative_bot.discobot_user }
|
||||
|
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
describe DiscourseNarrativeBot::Store do
|
||||
RSpec.describe DiscourseNarrativeBot::Store do
|
||||
describe '.set' do
|
||||
it 'should set the right value in the plugin store' do
|
||||
key = 'somekey'
|
||||
|
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
describe DiscourseNarrativeBot::TrackSelector do
|
||||
RSpec.describe DiscourseNarrativeBot::TrackSelector do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:narrative_bot) { ::DiscourseNarrativeBot::Base.new }
|
||||
let(:discobot_user) { narrative_bot.discobot_user }
|
||||
|
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
describe Jobs::DiscourseNarrativeBot::RemapOldBotImages do
|
||||
RSpec.describe Jobs::DiscourseNarrativeBot::RemapOldBotImages do
|
||||
context "when bot's post contains an old link" do
|
||||
let!(:post) do
|
||||
Fabricate(:post,
|
||||
|
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
describe "Discobot Certificate" do
|
||||
RSpec.describe "Discobot Certificate" do
|
||||
let(:user) { Fabricate(:user, name: 'Jeff Atwood') }
|
||||
|
||||
let(:params) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
describe "Discobot welcome post" do
|
||||
RSpec.describe "Discobot welcome post" do
|
||||
let(:user) { Fabricate(:user) }
|
||||
|
||||
before do
|
||||
|
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
describe User do
|
||||
RSpec.describe User do
|
||||
let(:user) { Fabricate(:user) }
|
||||
let(:profile_page_url) { "#{Discourse.base_url}/users/#{user.username}" }
|
||||
|
||||
|
Reference in New Issue
Block a user