Sha256: 1edd1545bafeb8c96986a8bf459c8283e1c01a6f557ac8f4b0e4b44fdae6df42
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' require File.expand_path('../test_broker', __FILE__) describe OnStomp::OpenURI, "full stack test", :fullstack => true, :openuri => true do let(:broker) { TestBroker.new } before(:each) do broker.start end after(:each) do broker.stop end describe "opening URIs" do it "should deliver some SEND frames" do open("stomp://localhost/queue/onstomp/open-uri/test") do |c| c.send "Test Message 1" c.send "Another Test Message" end broker.join broker.bodies_for("/queue/onstomp/open-uri/test").should == [ "Test Message 1", "Another Test Message" ] end it "should receive the some MESSAGE frames" do open("stomp://localhost/queue/onstomp/open-uri/test") do |c| c.send "Test Message 1" c.send "Another Test Message" c.send "Last Message" c.first.body.should == "Test Message 1" c.first(2).map { |m| m.body }.should == [ "Another Test Message", "Last Message" ] end broker.join end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
onstomp-1.0.2 | spec/onstomp/full_stacks/open-uri_spec.rb |
onstomp-1.0.1 | spec/onstomp/full_stacks/open-uri_spec.rb |
onstomp-1.0.0 | spec/onstomp/full_stacks/open-uri_spec.rb |