File: assert_equal_xml.rb

package info (click to toggle)
ruby-xmpp4r 0.5.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,384 kB
  • sloc: ruby: 17,382; xml: 74; sh: 12; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 383 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Test::Unit::Assertions
  public
  ##
  # Like assert_equal, but actual comparision switches parameters to
  # make use of our attribute order agnostic REXML#==
  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
end