mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-23 13:26:22 -04:00
FIX: Clean up specs properly.
This commit is contained in:
parent
aa9decf6fd
commit
ec90655c41
1 changed files with 3 additions and 2 deletions
|
@ -48,7 +48,8 @@ describe Plugin::Instance do
|
||||||
|
|
||||||
# DiscourseEvent
|
# DiscourseEvent
|
||||||
@hello_count = 0
|
@hello_count = 0
|
||||||
@plugin.on(:hello) { @hello_count += 1 }
|
@increase_count = -> { @hello_count += 1 }
|
||||||
|
@plugin.on(:hello, &@increase_count)
|
||||||
|
|
||||||
# Serializer
|
# Serializer
|
||||||
@plugin.add_to_serializer(:trout, :scales) { 1024 }
|
@plugin.add_to_serializer(:trout, :scales) { 1024 }
|
||||||
|
@ -56,7 +57,7 @@ describe Plugin::Instance do
|
||||||
end
|
end
|
||||||
|
|
||||||
after do
|
after do
|
||||||
DiscourseEvent.off(:hello)
|
DiscourseEvent.off(:hello, &@increase_count)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "checks enabled/disabled functionality for extensions" do
|
it "checks enabled/disabled functionality for extensions" do
|
||||||
|
|
Loading…
Add table
Reference in a new issue