Make sure we reset global in specs.
This commit is contained in:
parent
87e84756f0
commit
1f70fc9e11
|
@ -5,8 +5,13 @@ describe DiscourseEvent do
|
|||
|
||||
describe "#events" do
|
||||
it "defaults to {}" do
|
||||
begin
|
||||
original_events = DiscourseEvent.events
|
||||
DiscourseEvent.instance_variable_set(:@events, nil)
|
||||
expect(DiscourseEvent.events).to eq({})
|
||||
ensure
|
||||
DiscourseEvent.instance_variable_set(:@events, original_events)
|
||||
end
|
||||
end
|
||||
|
||||
describe "key value" do
|
||||
|
|
Loading…
Reference in New Issue