mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
FIX: Clean up specs properly.
This commit is contained in:
parent
aa9decf6fd
commit
ec90655c41
@ -48,7 +48,8 @@ describe Plugin::Instance do
|
||||
|
||||
# DiscourseEvent
|
||||
@hello_count = 0
|
||||
@plugin.on(:hello) { @hello_count += 1 }
|
||||
@increase_count = -> { @hello_count += 1 }
|
||||
@plugin.on(:hello, &@increase_count)
|
||||
|
||||
# Serializer
|
||||
@plugin.add_to_serializer(:trout, :scales) { 1024 }
|
||||
@ -56,7 +57,7 @@ describe Plugin::Instance do
|
||||
end
|
||||
|
||||
after do
|
||||
DiscourseEvent.off(:hello)
|
||||
DiscourseEvent.off(:hello, &@increase_count)
|
||||
end
|
||||
|
||||
it "checks enabled/disabled functionality for extensions" do
|
||||
|
Loading…
Reference in New Issue
Block a user