From 35bc0c943f8cc3bbcfa491fbb6b0dfc01d8b1e94 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 5 Sep 2016 19:33:03 +0800 Subject: [PATCH] More randomly failing specs fixes. --- spec/components/discourse_plugin_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/components/discourse_plugin_spec.rb b/spec/components/discourse_plugin_spec.rb index 3cd2a9d06..108432022 100644 --- a/spec/components/discourse_plugin_spec.rb +++ b/spec/components/discourse_plugin_spec.rb @@ -38,11 +38,11 @@ describe DiscoursePlugin do context 'registering for callbacks' do before do plugin.stubs(:hello) - plugin.listen_for(:hello) + @proc = plugin.listen_for(:hello).first end after do - DiscourseEvent.off(:hello) + DiscourseEvent.off(:hello, &@proc) end it "calls the method when it is triggered" do