Sha256: 70f2100480e9ff520ca8ce908fce9469d8f7bc5ba5998543008937e1078f8508

Contents?: true

Size: 623 Bytes

Versions: 254

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/arguments_consumer'

RSpec.describe ::EacRubyUtils::ArgumentsConsumer do
  let(:instance) { described_class.new(%i[a b c d], d: 'd_value') }
  let(:args) { ['a_value', 'b_value', e: 'e_value'] }
  let(:result) { instance.parse(args) }

  it { expect(result).to be_a(::Hash) }
  it { expect(result.count).to eq(5) }
  it { expect(result.fetch(:a)).to eq('a_value') }
  it { expect(result.fetch(:b)).to eq('b_value') }
  it { expect(result.fetch(:c)).to eq(nil) }
  it { expect(result.fetch(:d)).to eq('d_value') }
  it { expect(result.fetch(:e)).to eq('e_value') }
end

Version data entries

254 entries across 254 versions & 3 rubygems

Version Path
eac_tools-0.76.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.76.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.75.2 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.75.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.75.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.74.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.74.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.73.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.72.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.70.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.70.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.69.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.69.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.68.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.67.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.67.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.66.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.65.1 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.65.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb
eac_tools-0.64.0 sub/eac_ruby_utils/spec/lib/eac_ruby_utils/arguments_consumer_spec.rb