support/doctest_helper.rb in watir-6.7.3 vs support/doctest_helper.rb in watir-6.8.0

- old
+ new

@@ -1,7 +1,8 @@ require 'watir' require 'watirspec' +require 'webdrivers' # # 1. If example does not start browser, start new one, reuse until example # finishes and close after. # 2. If example starts browser and assigns it to local variable `browser`, @@ -61,21 +62,23 @@ doctest.before("Watir::Element##{name}") do browser.goto WatirSpec.url_for('non_control_elements.html') end end - doctest.before('Watir::List') do - browser.goto WatirSpec.url_for('non_control_elements.html') + %w[Watir::JSExecution Watir::List].each do |name| + doctest.before(name) do + browser.goto WatirSpec.url_for('non_control_elements.html') + end end - doctest.before('Watir::Table') do - browser.goto WatirSpec.url_for('tables.html') + %w[fire_event].each do |name| + doctest.before("Watir::JSExecution##{name}") do + browser.goto WatirSpec.url_for('forms_with_input_elements.html') + end end - %w[inner_html outer_html html].each do |name| - doctest.before("Watir::Element##{name}") do - browser.goto WatirSpec.url_for('inner_outer.html') - end + doctest.before('Watir::Table') do + browser.goto WatirSpec.url_for('tables.html') end %w[Watir::HasWindow Watir::Window#== Watir::Window#use].each do |name| doctest.before(name) do browser.goto WatirSpec.url_for('window_switching.html')