mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
DEV: no instance variables in specs
This commit is contained in:
parent
07ed495392
commit
b6c1020fbf
|
@ -4,12 +4,10 @@ RSpec.describe Chat::AutoJoinChannels do
|
|||
describe ".call" do
|
||||
subject(:result) { described_class.call(params: {}) }
|
||||
|
||||
before do
|
||||
@previous_events = DiscourseEvent.events.dup
|
||||
DiscourseEvent.events.clear
|
||||
end
|
||||
let!(:previous_events) { DiscourseEvent.events.dup }
|
||||
|
||||
after { @previous_events.each { |event, handlers| DiscourseEvent.events[event] = handlers } }
|
||||
before { DiscourseEvent.events.clear }
|
||||
after { previous_events.each { |event, handlers| DiscourseEvent.events[event] = handlers } }
|
||||
|
||||
context "when chat is disabled" do
|
||||
before { SiteSetting.chat_enabled = false }
|
||||
|
|
|
@ -4,12 +4,10 @@ RSpec.describe Chat::AutoLeaveChannels do
|
|||
describe ".call" do
|
||||
subject(:result) { described_class.call(params: {}) }
|
||||
|
||||
before do
|
||||
@previous_events = DiscourseEvent.events.dup
|
||||
DiscourseEvent.events.clear
|
||||
end
|
||||
let!(:previous_events) { DiscourseEvent.events.dup }
|
||||
|
||||
after { @previous_events.each { |event, handlers| DiscourseEvent.events[event] = handlers } }
|
||||
before { DiscourseEvent.events.clear }
|
||||
after { previous_events.each { |event, handlers| DiscourseEvent.events[event] = handlers } }
|
||||
|
||||
context "when chat is disabled" do
|
||||
before { SiteSetting.chat_enabled = false }
|
||||
|
|
Loading…
Reference in New Issue
Block a user