Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account for different handling of symbol keys in Rails 4.0
Comparing as a JSON string vs. as the Hash that is convert to JSON works around the different Hash representations. This likely has to do with the introduction of config.action_dispatch.perform_deep_munge in Rails 4.1 See Rails issue 13420 1) Failure: ActiveModel::Serializer::Adapter::Json::HasManyTestTest#test_has_many_with_no_serializer [active_model_serializers/test/adapter/json/has_many_test.rb:36]: --- expected +++ actual @@ -1 +1 @@ -{:id=>42, :tags=>[{"attributes"=>{"id"=>1, "name"=>"#hash_tag"}}]} +{:id=>42, :tags=>[{"attributes"=>{:id=>1, :name=>"#hash_tag"}}]} 2) Failure: ActiveModel::Serializer::AssociationsTest#test_has_many_with_no_serializer [active_model_serializers/test/serializers/associations_test.rb:74]: --- expected +++ actual @@ -1 +1 @@ -[{"attributes"=>{"name"=>"#hashtagged"}}] +[{"attributes"=>{:name=>"#hashtagged"}}]
- Loading branch information