test/test-assertions.rb in test-unit-capybara-1.0.5 vs test/test-assertions.rb in test-unit-capybara-1.0.6
- old
+ new
@@ -255,17 +255,18 @@
end
def test_pretty_print
visit("/")
section_html = @html.scan(/<div class="section">.*?<\/div>/m)[0]
+ element_class = find("html").class
message = <<-EOM.strip
<"XXX"> expected but was
-<\#<Capybara::Element tag="div" path="/html/body/div"
+<\#<#{element_class} tag="div" path="/html/body/div"
#{section_html}>>.
diff:
- "XXX"
-+ \#<Capybara::Element tag="div" path="/html/body/div"
++ \#<#{element_class} tag="div" path="/html/body/div"
+ <div class="section">
+ <h2>World</h2>
+ </div>>
EOM
exception = Test::Unit::AssertionFailedError.new(message)