Sha256: be7caac1896f419718abb45a2852308bbf0a53eef96d8e1fd99c73623c4f972e

Contents?: true

Size: 695 Bytes

Versions: 7

Compression:

Stored size: 695 Bytes

Contents

require "spec_helper"

describe Qsagi::Message do
  describe "delivery_tag" do
    it "returns the delivery_tag" do
      delivery_details = OpenStruct.new(:delivery_tag => "tag")
      Qsagi::Message.new(delivery_details, :parsed_payload).delivery_tag.should == "tag"
    end
  end

  describe "exchange" do
    it "returns the exchange" do
      delivery_details = OpenStruct.new(:exchange => "the_exchange")
      Qsagi::Message.new(delivery_details, :parsed_payload).exchange.should == "the_exchange"
    end
  end

  describe "payload" do
    it "returns the parsed payload" do
      Qsagi::Message.new(:deliver_details, :parsed_payload).payload.should == :parsed_payload
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
qsagi-0.2.2 spec/qsagi/message_spec.rb
qsagi-0.2.1 spec/qsagi/message_spec.rb
qsagi-0.2.0 spec/qsagi/message_spec.rb
qsagi-0.1.3 spec/qsagi/message_spec.rb
qsagi-0.1.2 spec/qsagi/message_spec.rb
qsagi-0.1.1 spec/qsagi/message_spec.rb
qsagi-0.1.0 spec/qsagi/message_spec.rb