Sha256: 28e2dadd3a74198d224a895c27502208dd9971a82caca37d923e218caa364cd5

Contents?: true

Size: 657 Bytes

Versions: 8

Compression:

Stored size: 657 Bytes

Contents

require 'doublespeak_spec_helper'

module Shoulda::Matchers::Doublespeak
  describe DoubleImplementationRegistry do
    describe '.find' do
      it 'returns an instance of StubImplementation if given :stub' do
        expect(described_class.find(:stub)).to be_a(StubImplementation)
      end

      it 'returns ProxyImplementation if given :proxy' do
        expect(described_class.find(:proxy)).to be_a(ProxyImplementation)
      end

      it 'raises an ArgumentError if not given a registered implementation' do
        expect {
          expect(described_class.find(:something_else))
        }.to raise_error(ArgumentError)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shoulda-matchers-3.1.3 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
shoulda-matchers-4.0.0.rc1 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
shoulda-matchers-3.1.2 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
shoulda-matchers-3.1.1 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
shoulda-matchers-3.1.0 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
shoulda-matchers-3.0.1 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
shoulda-matchers-3.0.0 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
shoulda-matchers-3.0.0.rc1 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb