Tidy up the tests

* Use assert_nil where appropriate
* Lead with the expected value in collection_serializer_test.rb, etc
 so that expected/actual in test failure messages are not reversed
This commit is contained in:
Ben Woosley
2016-01-07 11:19:14 -08:00
parent 7d4f0c5c8a
commit 0a6c133d25
4 changed files with 15 additions and 15 deletions

View File

@@ -52,8 +52,8 @@ module ActiveModel
serializer = association.serializer
options = association.options
assert_equal key, :tags
assert_equal serializer, nil
assert_equal :tags, key
assert_nil serializer
assert_equal [{ name: '#hashtagged' }].to_json, options[:virtual_value].to_json
end
end