Sha256: 2f2b22d0f8b1d4b9a31f24af0da52a6cdd5df700f8ac8f427019ff6ba9dd4427

Contents?: true

Size: 601 Bytes

Versions: 13

Compression:

Stored size: 601 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Punchblock
  class Client
    describe ComponentRegistry do
      let(:uri)       { 'abc123' }
      let(:component) { double 'Component', source_uri: uri }

      it 'should store components and allow lookup by ID' do
        subject << component
        subject.find_by_uri(uri).should be component
      end

      it 'should allow deletion of components' do
        subject << component
        subject.find_by_uri(uri).should be component
        subject.delete component
        subject.find_by_uri(uri).should be_nil
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
punchblock-2.5.2 spec/punchblock/client/component_registry_spec.rb
punchblock-2.5.1 spec/punchblock/client/component_registry_spec.rb
punchblock-2.5.0 spec/punchblock/client/component_registry_spec.rb
punchblock-2.4.2 spec/punchblock/client/component_registry_spec.rb
punchblock-2.4.0 spec/punchblock/client/component_registry_spec.rb
punchblock-2.3.1 spec/punchblock/client/component_registry_spec.rb
punchblock-2.3.0 spec/punchblock/client/component_registry_spec.rb
punchblock-2.2.2 spec/punchblock/client/component_registry_spec.rb
punchblock-2.2.1 spec/punchblock/client/component_registry_spec.rb
punchblock-2.2.0 spec/punchblock/client/component_registry_spec.rb
punchblock-2.1.1 spec/punchblock/client/component_registry_spec.rb
punchblock-2.1.0 spec/punchblock/client/component_registry_spec.rb
punchblock-2.0.2 spec/punchblock/client/component_registry_spec.rb