mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
Properly clean up plugin event in specs..
This commit is contained in:
parent
aabb7a8592
commit
aa1f306894
1 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ describe Plugin::Instance do
|
||||||
# DiscourseEvent
|
# DiscourseEvent
|
||||||
@hello_count = 0
|
@hello_count = 0
|
||||||
@increase_count = -> { @hello_count += 1 }
|
@increase_count = -> { @hello_count += 1 }
|
||||||
@plugin.on(:hello, &@increase_count)
|
@set = @plugin.on(:hello, &@increase_count)
|
||||||
|
|
||||||
# Serializer
|
# Serializer
|
||||||
@plugin.add_to_serializer(:trout, :scales) { 1024 }
|
@plugin.add_to_serializer(:trout, :scales) { 1024 }
|
||||||
|
@ -57,7 +57,7 @@ describe Plugin::Instance do
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
after do
|
||||||
DiscourseEvent.off(:hello, &@increase_count)
|
DiscourseEvent.off(:hello, &@set.last)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "checks enabled/disabled functionality for extensions" do
|
it "checks enabled/disabled functionality for extensions" do
|
||||||
|
|
Loading…
Reference in a new issue