features/with_gametel_option.feature in testgen-0.4 vs features/with_gametel_option.feature in testgen-0.5
- old
+ new
@@ -4,22 +4,42 @@
When I run `testgen project sample --with-gametel`
Then a file named "sample/Gemfile" should exist
And the file "sample/Gemfile" should contain "gem 'require_all'"
And the file "sample/Gemfile" should contain "gem 'gametel'"
- Scenario: Adding page-object to env.rb
+ Scenario: Adding gametel to env.rb
When I run `testgen project sample --with-gametel`
Then a file named "sample/features/support/env.rb" should exist
+ And the file "sample/features/support/env.rb" should contain "require 'brazenhead'"
+ And the file "sample/features/support/env.rb" should contain "require 'brazenhead/server'"
And the file "sample/features/support/env.rb" should contain "require 'gametel'"
- And the file "sample/features/support/env.rb" should contain "World(Gametel::Navigation)"
+ And the file "sample/features/support/env.rb" should contain "World(Gametel::Navigation)"
+
+ Scenario: Creating the keystore
+ When I run `testgen project sample --with-gametel`
+ Then a file named "sample/features/support/env.rb" should exist
+ And the file "sample/features/support/env.rb" should contain "keystore = {"
+ And the file "sample/features/support/env.rb" should contain ":path => File.expand_path('~/.android/debug.keystore')"
+ And the file "sample/features/support/env.rb" should contain ":alias => 'androiddebugkey'"
+ And the file "sample/features/support/env.rb" should contain ":password => 'android'"
+ And the file "sample/features/support/env.rb" should contain ":keystore_password => 'android'"
+
+ Scenario: Creating the Driver and hooks
+ When I run `testgen project sample --with-gametel`
+ Then a file named "sample/features/support/env.rb" should exist
+ And the file "sample/features/support/env.rb" should contain "server = Brazenhead::Server.new(PATH_TO_APK, keystore)"
+ And the file "sample/features/support/env.rb" should contain "class Driver"
+ And the file "sample/features/support/env.rb" should contain "@driver = Driver.new"
+ And the file "sample/features/support/env.rb" should contain "server.start(APK_NAME_GOES_HERE)"
+ And the file "sample/features/support/env.rb" should contain "server.stop"
Scenario: Should not create the hooks file
When I run `testgen project sample --with-gametel`
Then a file named "sample/features/support/hooks.rb" should not exist
- Scenario: Creating the pages directory under support
+ Scenario: Creating the screens directory under support
When I run `testgen project sample --with-gametel`
Then a directory named "sample/features/support/screens" should exist
- Scenario: Creating the pages directory under lib when using --wth-lib
+ Scenario: Creating the screens directory under lib when using --wth-lib
When I run `testgen project sample --with-gametel --with-lib`
Then a directory named "sample/lib/screens" should exist