Sha256: 5fd9f8185c5ff51eb9bd41450be15edbe95ab013820f129e6171a276cfcc41ff
Contents?: true
Size: 569 Bytes
Versions: 10
Compression:
Stored size: 569 Bytes
Contents
require 'spec_helper' module Finitio describe ProxyType, "delegation pattern" do let(:proxy){ ProxyType.new('Int') } subject{ proxy.resolve(system) } context 'when type exists' do let(:system){ {'Int' => intType} } it 'resolves fine' do subject expect(proxy.target).to eq(intType) end end context 'when type does not exist' do let(:system){ {} } it 'raises an error' do expect{ subject }.to raise_error(Finitio::Error, "No such type `Int`") end end end end
Version data entries
10 entries across 10 versions & 1 rubygems