From 30df88ae06182a72ae7f959dce8d8df4a7adb99a Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 21 Jul 2010 21:00:11 -0300 Subject: These tests are trusting in the order of the elements so use OrderedHash instead of Hash --- activeresource/test/cases/base_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activeresource') diff --git a/activeresource/test/cases/base_test.rb b/activeresource/test/cases/base_test.rb index 4d036d73cc..a176c037d5 100644 --- a/activeresource/test/cases/base_test.rb +++ b/activeresource/test/cases/base_test.rb @@ -6,6 +6,7 @@ require "fixtures/sound" require "fixtures/beast" require "fixtures/proxy" require 'active_support/json' +require 'active_support/ordered_hash' require 'active_support/core_ext/hash/conversions' require 'mocha' @@ -555,7 +556,7 @@ class BaseTest < Test::Unit::TestCase assert_equal '/people.xml?name[]=bob&name[]=your+uncle%2Bme&name[]=&name[]=false', Person.collection_path(:name => ['bob', 'your uncle+me', nil, false]) - assert_equal '/people.xml?struct[a][]=2&struct[a][]=1&struct[b]=fred', Person.collection_path(:struct => {:a => [2,1], 'b' => 'fred'}) + assert_equal '/people.xml?struct[a][]=2&struct[a][]=1&struct[b]=fred', Person.collection_path(:struct => ActiveSupport::OrderedHash[:a, [2,1], 'b', 'fred']) end def test_custom_element_path -- cgit v1.2.3