Sha256: ca78161815013475d1798dc50e537661f0c538de4240501537a3ec4757df9872

Contents?: true

Size: 714 Bytes

Versions: 3

Compression:

Stored size: 714 Bytes

Contents

# frozen_string_literal: true

describe '#load_from_self => format: <unsupported>' do
  specify 'fails on unsupported formats' do
    expect do
      Class.new(Qonfig::DataSet) do
        load_from_self format: :atata
      end
    end.to raise_error(Qonfig::UnsupportedLoaderFormatError)
  end

  specify 'fails on empty format parameter' do
    expect do
      Class.new(Qonfig::DataSet) do
        load_from_self format: ''
      end
    end.to raise_error(Qonfig::UnsupportedLoaderFormatError)
  end

  specify 'fails on incorrect format parameter' do
    expect do
      Class.new(Qonfig::DataSet) do
        load_from_self format: Object.new
      end
    end.to raise_error(Qonfig::ArgumentError)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
qonfig-0.28.0 spec/features/load_from_self/format_option_unsupported_spec.rb
qonfig-0.27.0 spec/features/load_from_self/format_option_unsupported_spec.rb
qonfig-0.26.0 spec/features/load_from_self/format_option_unsupported_spec.rb