aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-05-06 02:03:46 +0000
committerMichael Koziarski <michael@koziarski.com>2007-05-06 02:03:46 +0000
commite64236882919a6696ff64a4e3e736955b4d09753 (patch)
tree0cec9a937ef31abbc90656326b2e2f0aac986fea
parent4cbbebb1c3385a232a6943b92ff41697ab97cb27 (diff)
downloadrails-e64236882919a6696ff64a4e3e736955b4d09753.tar.gz
rails-e64236882919a6696ff64a4e3e736955b4d09753.tar.bz2
rails-e64236882919a6696ff64a4e3e736955b4d09753.zip
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
-rw-r--r--activerecord/test/xml_serialization_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/xml_serialization_test.rb b/activerecord/test/xml_serialization_test.rb
index b32a55a786..b40fa0b84e 100644
--- a/activerecord/test/xml_serialization_test.rb
+++ b/activerecord/test/xml_serialization_test.rb
@@ -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 \ No newline at end of file