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

Version Path
hyrax-1.1.1 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.3 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-1.1.0 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.2 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.1 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.0 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.0.rc3 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.0.rc2 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.0.rc1 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-1.0.5 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.0.beta5 spec/conversions/power_converters/sipity_agent_spec.rb
curation_concerns-1.7.8 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.0.beta4 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.0.beta3 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.0.beta2 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-2.0.0.beta1 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-1.0.4 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-1.0.3 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-1.0.2 spec/conversions/power_converters/sipity_agent_spec.rb
hyrax-1.0.1 spec/conversions/power_converters/sipity_agent_spec.rb