Sha256: 5b2ce2f8343462286c23ccd176a2283b1bd0611af7d06b65d9a540a2d1adbed2
Contents?: true
Size: 716 Bytes
Versions: 35
Compression:
Stored size: 716 Bytes
Contents
require "spec_helper" RSpec.describe 'PowerConverter', no_clean: true do context '#convert_to_sipity_agent' do it 'will convert a Sipity::Agent' do object = Sipity::Agent.new expect(PowerConverter.convert_to_sipity_agent(object)).to eq(object) end it 'will convert an object that responds to #to_sipity_agent' do object = double(to_sipity_agent: :a_sipity_agent) expect(PowerConverter.convert_to_sipity_agent(object)).to eq(:a_sipity_agent) end it 'will raise an exception if it cannot convert the given object' do object = double expect { PowerConverter.convert_to_sipity_agent(object) }.to raise_error(PowerConverter::ConversionError) end end end
Version data entries
35 entries across 35 versions & 3 rubygems