Sha256: a5049408b94df4a6db0d97c620f4d07f584fce9cb7f7effbed364ff22d843f0c

Contents?: true

Size: 712 Bytes

Versions: 23

Compression:

Stored size: 712 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))

super_array = CityGrid::Abstraction::SuperArray
super_hash  = CityGrid::Abstraction::SuperHash

context "A SuperArray" do
  context "created" do
    context "with a single level" do
      setup { super_array.new([1, 2, 3]) }
      should("return the contents"){ topic == [1, 2, 3]}
    end

    context "with a hash inside" do
      setup { super_array.new([1, {:hello => "there"}])}
      should("replace it with a SuperHash"){ topic[1].is_a? super_hash}
    end

    context "with an array inside" do
      setup { super_array.new([1, [2, 3, 4]])}
      should("replace it with a SuperArray"){ topic[1].is_a? super_array}
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
citygrid_api-0.0.28 test/test_super_array.rb
citygrid_api-0.0.27 test/test_super_array.rb
citygrid_api-0.0.26 test/test_super_array.rb
citygrid_api-0.0.25 test/test_super_array.rb
citygrid_api-0.0.24 test/test_super_array.rb
citygrid_api-0.0.23 test/test_super_array.rb
citygrid_api-0.0.22 test/test_super_array.rb
citygrid_api-0.0.21 test/test_super_array.rb
citygrid_api-0.0.20 test/test_super_array.rb
citygrid_api-0.0.19 test/test_super_array.rb
citygrid_api-0.0.18 test/test_super_array.rb
citygrid_api-0.0.17 test/test_super_array.rb
citygrid_api-0.0.16 test/test_super_array.rb
citygrid_api-0.0.15 test/test_super_array.rb
citygrid_api-0.0.14 test/test_super_array.rb
citygrid_api-0.0.13 test/test_super_array.rb
citygrid_api-0.0.12 test/test_super_array.rb
citygrid_api-0.0.11 test/test_super_array.rb
citygrid_api-0.0.10 test/test_super_array.rb
citygrid_api-0.0.9 test/test_super_array.rb