Sha256: c2f147e5a82720459852cf9249ae4c1827087d4ac31db9bc0323b98ed10582b6

Contents?: true

Size: 650 Bytes

Versions: 4

Compression:

Stored size: 650 Bytes

Contents

require 'unit_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

4 entries across 4 versions & 2 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/shoulda-matchers-2.8.0/spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
shoulda-matchers-2.8.0 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
shoulda-matchers-2.8.0.rc2 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
shoulda-matchers-2.8.0.rc1 spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb