lib/testgen/generators/project/env.rb.tt in testgen-0.9 vs lib/testgen/generators/project/env.rb.tt in testgen-1.0
- old
+ new
@@ -1,47 +1,24 @@
<% if with_lib == 'true' -%>
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../../', 'lib'))
<% end -%>
require 'rspec'
-<% unless pageobject_driver.downcase == 'none' -%>
+<% if with_appium == 'false' and with_mohawk == 'false' -%>
require 'page-object'
+require 'data_magic'
<% end -%>
-<% if with_gametel == 'true' -%>
-require 'gametel'
-<% end -%>
<% if with_mohawk == 'true' -%>
require 'mohawk'
require 'win32/screenshot'
<% end -%>
<% if with_lib == 'true' -%>
require 'require_all'
require_all 'lib'
<% end -%>
-<% if with_gametel == 'true' -%>
-World(Gametel::Navigation)
-
-keystore = {
- :path => File.expand_path('~/.android/debug.keystore'),
- :alias => 'androiddebugkey',
- :password => 'android',
- :keystore_password => 'android'
-}
-
-Gametel.apk_path = PATH_TO_APK
-Gametel.keystore = keystore
-
-Before do
- @driver = Gametel.start(ACTIVITY_NAME_GOES_HERE)
-end
-
-After do
- Gametel.stop
-end
-<% end -%>
<% if with_appium == 'true' -%>
require 'appium_lib'
class AppiumWorld
@@ -68,10 +45,10 @@
at_exit do
driver_quit
end
<% end -%>
-<% unless pageobject_driver.downcase == 'none' -%>
+<% if with_appium == 'false' and with_mohawk == 'false' -%>
World(PageObject::PageFactory)
<% end -%>
<% if with_mohawk == 'true' -%>
World(Mohawk::Navigation)
Mohawk.app_path = PATH_TO_EXECUTABLE