Sha256: 7ef9e8a030ab97bb73c872ed5658a031351d2788bb8938404fdc3eac2571beb4

Contents?: true

Size: 455 Bytes

Versions: 5

Compression:

Stored size: 455 Bytes

Contents

covers 'facets/hash/argumentize'

test_case Hash do

  method :argumentize do

    setup do
      @h = { :list => [1,2], :base => "HI" }
    end

    test "without an argument field" do
      @h.argumentize.assert == [ { :list => [1,2], :base => "HI" } ]
    end

    test "with an argument field" do
      @h.argumentize(:list).assert == [ 1, 2, { :base => "HI" } ]
      @h.argumentize(:base).assert == [ "HI", { :list => [1,2] } ]
    end

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 test/core/hash/test_argumentize.rb
facets-3.1.0 test/core/hash/test_argumentize.rb
facets-3.0.0 test/core/hash/test_argumentize.rb
facets-2.9.3 test/core/hash/test_argumentize.rb
facets-2.9.2 test/core/hash/test_argumentize.rb