unittests/form_xpath_test.rb in watir-1.9.0 vs unittests/form_xpath_test.rb in watir-1.9.1.rc1
- old
+ new
@@ -28,28 +28,31 @@
include CaptureIOHelper
def test_showforms
goto_page "forms2.html"
actual = capture_stdout { browser.show_forms }
- assert_equal(<<END_OF_MESSAGE, actual)
+ expected = <<END_OF_MESSAGE
There are 4 forms
-Form name:
- id:
+Form name:
+ id:
method: get
action: pass.html
Form name: test2
id: f2
method: get
action: pass2.html
Form name: test3
- id:
+ id:
method: get
action: pass2.html
Form name: test2
- id:
+ id:
method: get
action: pass2.html
END_OF_MESSAGE
+ actual.gsub!(/(action: )file:.*\/(.*)$/,'\\1\\2') if actual =~ /file:/
+ actual.gsub!(/\s+\n/,"\n")
+ assert_equal(expected, actual)
end
end
class TC_Forms3_XPath < Test::Unit::TestCase
def setup