Sha256: 7ca44d8a8f005cd15bab4bd61c5c2b46c8e4df365e25226857a35a65436ba4fe

Contents?: true

Size: 665 Bytes

Versions: 3

Compression:

Stored size: 665 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Adhearsion
  module Rayo
    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
          expect(subject.find_by_uri(uri)).to be component
        end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
adhearsion-3.0.0.rc1 spec/adhearsion/rayo/client/component_registry_spec.rb
adhearsion-3.0.0.beta2 spec/adhearsion/rayo/client/component_registry_spec.rb
adhearsion-3.0.0.beta1 spec/adhearsion/rayo/client/component_registry_spec.rb