1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
thoughtbot--shoulda-matchers/spec/unit/shoulda/matchers/doublespeak/double_implementation_registry_spec.rb
2015-02-28 23:41:28 -07:00

21 lines
657 B
Ruby

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