lib/testgen/generators/project/env.rb.tt in testgen-0.5.2 vs lib/testgen/generators/project/env.rb.tt in testgen-0.6

- old
+ new

@@ -3,11 +3,10 @@ <% end -%> require 'rspec-expectations' <% unless pageobject_driver.downcase == 'none' -%> require 'page-object' -require 'page-object/page_factory' <% end -%> <% if with_lib == 'true' -%> require 'require_all' require_all 'lib' @@ -46,6 +45,23 @@ end <% end -%> <% unless pageobject_driver.downcase == 'none' -%> World(PageObject::PageFactory) +<% end -%> + +<% if with_mohawk == 'true' -%> +require 'childprocess' +require 'mohawk' + +World(Mohawk::Navigation) + +Before do + @process = ChildProcess.build(PATH_TO_EXECUTABLE) + @process.start + RAutomation::WaitHelper.wait_until {RAutomation::Window.new(:pid => @process.pid).present?} +end + +After do + @process.stop +end <% end -%>