spec/integrations/shared_examples.rb in firehose-1.1.1 vs spec/integrations/shared_examples.rb in firehose-1.2.0

- old
+ new

@@ -5,16 +5,16 @@ shared_examples_for 'Firehose::Rack::App' do include EM::TestHelper include IntegrationTestHelper before(:all) do - Firehose::Producer.adapter = :em_http + Firehose::Client::Producer::Http.adapter = :em_http start_server end after(:all) do - Firehose::Producer.adapter = nil + Firehose::Client::Producer::Http.adapter = nil stop_server end before(:each) { WebMock.disable! } after(:each) { WebMock.enable! } @@ -39,10 +39,10 @@ em.add_timer(1) { em.stop } if received.values.all?{|arr| arr.size == messages.size } end # Setup a publisher publish = Proc.new do - Firehose::Producer.new.publish(outgoing.shift).to(channel) do + Firehose::Client::Producer::Http.new.publish(outgoing.shift).to(channel) do # The random timer ensures that sometimes the clients will be behind # and sometimes they will be caught up. EM::add_timer(rand*0.005) { publish.call } unless outgoing.empty? end end