aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/channel/base_test.rb5
-rw-r--r--test/test_helper.rb8
2 files changed, 11 insertions, 2 deletions
diff --git a/test/channel/base_test.rb b/test/channel/base_test.rb
index e7944ff06b..bac8569780 100644
--- a/test/channel/base_test.rb
+++ b/test/channel/base_test.rb
@@ -23,6 +23,11 @@ class ActionCable::Channel::BaseTest < ActiveSupport::TestCase
on_subscribe :toggle_subscribed
on_unsubscribe :toggle_subscribed
+ def initialize(*)
+ @subscribed = false
+ super
+ end
+
def subscribed
@room = Room.new params[:id]
@actions = []
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 49fb1495f4..b9cb34f891 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -18,12 +18,16 @@ ActiveSupport.test_order = :sorted
# Require all the stubs and models
Dir[File.dirname(__FILE__) + '/stubs/*.rb'].each {|file| require file }
+$CELLULOID_DEBUG = false
+$CELLULOID_TEST = false
Celluloid.logger = Logger.new(StringIO.new)
-class Faye::WebSocket
+class << Faye::WebSocket
+ remove_method :ensure_reactor_running
+
# We don't want Faye to start the EM reactor in tests because it makes testing much harder.
# We want to be able to start and stop EM loop in tests to make things simpler.
- def self.ensure_reactor_running
+ def ensure_reactor_running
# no-op
end
end