Module: EimXML::Assertions
- Defined in:
- lib/eim_xml/assertions.rb
Instance Method Summary collapse
Instance Method Details
#assert_has(expect, element, message = "") ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/eim_xml/assertions.rb', line 4 def assert_has(expect, element, ="") << "\n" unless .size==0 << "<#{element}> doesn't have\n<#{expect.inspect}>" assert_block() do element.has?(expect) end rescue Test::Unit::AssertionFailedError=>e bt = e.backtrace.find_all do |b| b !~ /#{Regexp.escape(__FILE__)}/ end raise Test::Unit::AssertionFailedError, e., bt end |