提交 1bc6b43f 编写于 作者: N Neeraj Singh 提交者: José Valim

Replace assert with assert_equal in some test cases

[#4654 state:resolved]
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 048cf9e9
......@@ -65,7 +65,7 @@ def test_error_on_update
def test_error_on_given_context
r = WrongReply.new
assert !r.valid?(:special_case)
assert "Invalid", r.errors[:title].join
assert_equal "Invalid", r.errors[:title].join
r.title = "secret"
r.content = "Good"
......@@ -73,7 +73,7 @@ def test_error_on_given_context
r.title = nil
assert !r.save(:context => :special_case)
assert "Invalid", r.errors[:title].join
assert_equal "Invalid", r.errors[:title].join
r.title = "secret"
assert r.save(:context => :special_case)
......
......@@ -1017,7 +1017,7 @@ def test_to_xml
encode = matz.encode
xml = matz.to_xml
assert encode, xml
assert_equal encode, xml
assert xml.include?('<?xml version="1.0" encoding="UTF-8"?>')
assert xml.include?('<name>Matz</name>')
assert xml.include?('<id type="integer">1</id>')
......@@ -1030,7 +1030,7 @@ def test_to_xml_with_element_name
encode = matz.encode
xml = matz.to_xml
assert encode, xml
assert_equal encode, xml
assert xml.include?('<?xml version="1.0" encoding="UTF-8"?>')
assert xml.include?('<ruby-creator>')
assert xml.include?('<name>Matz</name>')
......@@ -1065,7 +1065,7 @@ def test_to_json_with_element_name
json = joe.to_json
Person.format = :xml
assert encode, json
assert_equal encode, json
assert_match %r{^\{"ruby_creator":\{"person":\{}, json
assert_match %r{"id":6}, json
assert_match %r{"name":"Joe"}, json
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册