Sha256: 852b5caf478be7ba4687922053a78bfa040a7a4a1494963ef277b52ed9f99daa

Contents?: true

Size: 701 Bytes

Versions: 3

Compression:

Stored size: 701 Bytes

Contents

require 'spec_helper'


describe CarrierWave::Processor::Configuration do
  subject {CarrierWave::Processor::Configuration.new}
  it 'raises exception when no backend found' do
    expect{subject.backend(:undefined_backend)}.to raise_error(CarrierWave::Processor::BackendNotFound)
  end

  it 'doesnt raise exception when backend found' do
    expect{subject.backend(:base)}.not_to raise_error
  end

  context 'configure block' do
    it 'sets backend instance if backend chosen' do
      CarrierWave::Processor.configure do |config|
        config.backend :base
      end

      CarrierWave::Processor.configuration.backend.should be_kind_of CarrierWave::Processor::Backend::Base
    end
  end


end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
carrierwave-processor-1.1.2 spec/configuration_spec.rb
carrierwave-processor-1.1.1 spec/configuration_spec.rb
carrierwave-processor-1.1.0 spec/configuration_spec.rb