Module: Test::Unit::Assertions

Defined in:
lib/vendor/xmpp4r/test/lib/assert_equal_xml.rb

Instance Method Summary collapse

Instance Method Details

#assert_equal_xml(expected, actual, message = nil) ⇒ Object

Like assert_equal, but actual comparision switches parameters to make use of our attribute order agnostic REXML#==



6
7
8
9
10
11
12
# File 'lib/vendor/xmpp4r/test/lib/assert_equal_xml.rb', line 6

def assert_equal_xml(expected, actual, message=nil)
  full_message = build_message(message, <<EOT, expected, actual)
<?> expected but was
<?>.
EOT
  assert_block(full_message) { actual == expected }
end