spec/client_spec.rb in stomper-0.3.1 vs spec/client_spec.rb in stomper-0.3.2
- old
+ new
@@ -81,9 +81,19 @@
@client.start
@client.receiving?.should be_true
@client.stop
@client.receiving?.should be_false
end
+ it "should allow for a blocking threaded receiver" do
+ @mock_connection.should_receive(:receive).with(true).at_least(:once).and_return(nil)
+ @mock_connection.should_receive(:connected?).any_number_of_times.and_return(true)
+ @client.receiving?.should be_false
+ @client.start(:block => true)
+ @client.receiving?.should be_true
+ @client.stop
+ @client.receiving?.should be_false
+ end
+
end
describe "subscribing to queue" do
before(:each) do
@message_sent = Stomper::Frames::Message.new({'destination' => "/queue/test"}, "test message")
\ No newline at end of file