Permalink
Browse files

Fix test failing in ruby 1.8.7/ree, due to hash ordering

  • Loading branch information...
1 parent a7be2dd commit 38aca5a73aea32794ec491d6ee6110b1a6f64bc1 @carlosantoniodasilva committed Jan 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/i18n_alchemy/proxy_test.rb
@@ -247,8 +247,8 @@ def test_should_assign_for_nested_attributes_for_collection_association
def test_should_assign_for_nested_attributes_passing_a_hash_for_collection_with_unique_keys
@supplier_localized.assign_attributes(:products_attributes => {"0" => {:price => '2,93', "_destroy"=>"false"}, "1" => {:price => '2,85', "_destroy" => "false"}})
- assert_equal '2,93', @supplier_localized.products.first.localized.price
- assert_equal '2,85', @supplier_localized.products.last.localized.price
+ prices = @supplier.products.map { |p| p.localized.price }.sort
+ assert_equal ['2,85', '2,93'], prices
end
def test_should_assign_for_nested_attributes_for_one_to_one_association

0 comments on commit 38aca5a

Please sign in to comment.