Sha256: a89abd52274cc878000452c94474da57822cea10e307c763bc82c1839e4d1844

Contents?: true

Size: 681 Bytes

Versions: 4

Compression:

Stored size: 681 Bytes

Contents

require 'routemaster/client/topic'

describe Routemaster::Client::Topic do

  let(:name)      { 'widgets' }
  let(:publisher) { 'demo' }
  let(:events)    { 0 }

  subject do
    described_class.new({
      "name"      => name,
      "publisher" => publisher,
      "events"    => events
    })
  end

  describe '#initialize' do

    it "creates an instance of #{described_class}" do
      expect(subject).to be_an_instance_of(described_class)
    end

  end

  describe '#attributes' do

    it "returns an hash with all attributes" do
      expect(subject.attributes).to eql({
        name: name,
        publisher: publisher,
        events: events
      })
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
routemaster-client-3.2.3 spec/client/topic_spec.rb
routemaster-client-3.2.0 spec/client/topic_spec.rb
routemaster-client-3.1.2 spec/client/topic_spec.rb
routemaster-client-3.1.1 spec/client/topic_spec.rb