Sha256: 9ac2c2b88afb06756d7d25c67de6f3ffb3353836b45175e9f0b47a6d2555eaf3

Contents?: true

Size: 628 Bytes

Versions: 12

Compression:

Stored size: 628 Bytes

Contents

require "test_helper"
require "rorschart/data/rorschart_data"

module Rorschart

    class TestRorschartData  < Minitest::Unit::TestCase

    def test_flatten_data

        # Given
        data = [
                  {:a => 1, :b => 2},
                  {:a => 2, :b => 3},
                  {:b => 2, :c => 4}
                ] 

        # When

        rorschart_data = RorschartData.new(nil)
        flat = rorschart_data.send(:flatten_array_hash, data)

        # flat = flatten_array_hash(data)

        # Then
        excepted = {:a => 2, :b => 2, :c => 4}

        assert_equal excepted, flat
    end
      

    end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rorschart-0.19.2 test/data/rorschart_data_test.rb
rorschart-0.19.1 test/data/rorschart_data_test.rb
rorschart-0.19.0 test/data/rorschart_data_test.rb
rorschart-0.18.0 test/data/rorschart_data_test.rb
rorschart-0.17.0 test/data/rorschart_data_test.rb
rorschart-0.16.0 test/data/rorschart_data_test.rb
rorschart-0.15.1 test/data/rorschart_data_test.rb
rorschart-0.15.0 test/data/rorschart_data_test.rb
rorschart-0.14.1 test/data/rorschart_data_test.rb
rorschart-0.14.0 test/data/rorschart_data_test.rb
rorschart-0.12.0 test/data/rorschart_data_test.rb
rorschart-0.11.0 test/data/rorschart_data_test.rb