Sha256: 91428c0ba9f8eae976c7d054546f756022a6bb4552b642c07e074b8f2bb0cb80

Contents?: true

Size: 296 Bytes

Versions: 4

Compression:

Stored size: 296 Bytes

Contents

RSpec.describe "Kernel#args_to_h!" do

  it "should create an hash, with the local variables as key / value pairs" do

    a = 1
    b = "two"
    c = :three

    created_hash  = args_to_h! :a, :c
    expected_hash = {a: 1, c: :three}    

    expect(created_hash).to eq expected_hash

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
eitil-1.2.4 spec/eitil_core/argument_helpers/args_to_h_bang_spec.rb
eitil-1.2.3 spec/eitil_core/argument_helpers/args_to_h_bang_spec.rb
eitil-1.2.2 spec/eitil_core/argument_helpers/args_to_h_bang_spec.rb
eitil-1.2.1 spec/eitil_core/argument_helpers/args_to_h_bang_spec.rb