Sha256: 6f825e5c4340e08244086775fa2c3ea1baff695601c377b957418b2c653f4122

Contents?: true

Size: 647 Bytes

Versions: 4

Compression:

Stored size: 647 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Punchblock
  class Client
    describe ComponentRegistry do
      let(:component_id)  { 'abc123' }
      let(:component)     { double 'Component', :component_id => component_id }

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
punchblock-2.0.1 spec/punchblock/client/component_registry_spec.rb
punchblock-2.0.0 spec/punchblock/client/component_registry_spec.rb
punchblock-2.0.0.beta2 spec/punchblock/client/component_registry_spec.rb
punchblock-2.0.0.beta1 spec/punchblock/client/component_registry_spec.rb