Permalink
Browse files

making yaml tests less specific to emitter. [#4425 state:resolved]

Signed-off-by: wycats <wycats@gmail.com>
  • Loading branch information...
1 parent cd6578f commit d92e3111fed2a5372d4bb8ac66c9d8542f730488 @tenderlove tenderlove committed with wycats Apr 17, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 activerecord/test/cases/base_test.rb
@@ -2095,7 +2095,8 @@ def test_to_xml
assert_equal written_on_in_current_timezone, xml.elements["//written-on"].text
assert_equal "datetime" , xml.elements["//written-on"].attributes['type']
- assert_equal "--- Have a nice day\n" , xml.elements["//content"].text
+ assert_match(/^--- Have a nice day\n/ , xml.elements["//content"].text)
+ assert_equal 'Have a nice day' , YAML.load(xml.elements["//content"].text)
assert_equal "yaml" , xml.elements["//content"].attributes['type']
assert_equal "david@loudthinking.com", xml.elements["//author-email-address"].text

0 comments on commit d92e311

Please sign in to comment.