Sha256: 0a7d8dda2ef739702098e1e9d20f2a28860af671c986ff0b079bc99180c67435

Contents?: true

Size: 304 Bytes

Versions: 4

Compression:

Stored size: 304 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(binding, :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_spec.rb
eitil-1.2.3 spec/eitil_core/argument_helpers/args_to_h_spec.rb
eitil-1.2.2 spec/eitil_core/argument_helpers/args_to_h_spec.rb
eitil-1.2.1 spec/eitil_core/argument_helpers/args_to_h_spec.rb