Sha256: d99ebf597b2e82275263efbc5d6d7bdcddbb91ea2c71f5f757e76ec6e2efacb7

Contents?: true

Size: 666 Bytes

Versions: 9

Compression:

Stored size: 666 Bytes

Contents

require 'routemaster/topic'

describe Routemaster::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

9 entries across 9 versions & 1 rubygems

Version Path
routemaster-client-3.1.0 spec/topic_spec.rb
routemaster-client-3.0.0 spec/topic_spec.rb
routemaster-client-2.1.0 spec/topic_spec.rb
routemaster-client-2.0.0 spec/topic_spec.rb
routemaster-client-1.2.3 spec/topic_spec.rb
routemaster-client-1.3.1 spec/topic_spec.rb
routemaster-client-1.2.2 spec/topic_spec.rb
routemaster-client-1.2.1 spec/topic_spec.rb
routemaster-client-1.2.0 spec/topic_spec.rb