This project is archived and is in readonly mode.
assert should be replaced with assert_equal in a particular test case
Reported by Neeraj Singh | May 18th, 2010 @ 03:54 AM
Here is a test case from ActiveResource.
def test_to_json
Person.include_root_in_json = true
Person.format = :json
joe = Person.find(6)
encode = joe.encode
json = joe.to_json
Person.format = :xml
assert encode, json
assert_match %r{^\{"person":\{"person":\{}, json
assert_match %r{"id":6}, json
assert_match %r{"name":"Joe"}, json
assert_match %r{\}\}\}$}, json
end
In the above test case 'assert' should be replaced by 'assert_equal'.
Patch will be attached through comment.
Comments and changes to this ticket
-
Neeraj Singh May 18th, 2010 @ 03:56 AM
- Tag changed from activeresource, rails3 to activeresource, patch, rails3
Attached is a patch against rails edge.
-
Repository May 18th, 2010 @ 03:13 PM
- State changed from new to resolved
(from [c00f8e49add3f4ab6416e738c4ee2837370b2f3f]) assert should be replaced with assert_equal in a particular test case
[#4636 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/c00f8e49add3f4ab6416e738c4ee28...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 4636 assert should be replaced with assert_equal in a particular test case [#4636 state:resolved]