Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 6668

Show
Ignore:
Timestamp:
05/06/07 02:03:46 (1 year ago)
Author:
nzkoz
Message:

Use assert_match instead of String#include? so we can get helpful error messages on failure

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/test/xml_serialization_test.rb

    r6654 r6668  
    147147  def test_include_uses_association_name 
    148148    xml = authors(:david).to_xml :include=>:hello_posts, :indent=>0 
    149     assert(xml.include?(%(<hello_posts><post>)) || xml.include?(%(</post></hello-posts>))) 
     149    assert_match %r{<hello-posts>}, xml 
     150    assert_match %r{<post>}, xml 
     151    assert_match %r{<sti-post>}, xml 
    150152  end 
    151153end