mirror of
https://github.com/github/rails.git
synced 2026-04-04 03:00:58 -04:00
Use assert_match instead of String#include? so we can get helpful error messages on failure
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -146,6 +146,8 @@ class DatabaseConnectedXmlSerializationTest < Test::Unit::TestCase
|
||||
|
||||
def test_include_uses_association_name
|
||||
xml = authors(:david).to_xml :include=>:hello_posts, :indent=>0
|
||||
assert(xml.include?(%(<hello_posts><post>)) || xml.include?(%(</post></hello-posts>)))
|
||||
assert_match %r{<hello-posts>}, xml
|
||||
assert_match %r{<post>}, xml
|
||||
assert_match %r{<sti-post>}, xml
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user