diff --git a/ChangeLog b/ChangeLog index a016e45..968e0fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +=== Version 0.5.1 / 2012-10-1 +* Added rake to the gemfile when using gametel +* Added required usage of require_all in env.rb when using gametel +* Changed placeholder for call to start + === Version 0.5 / 2012-09-24 * Added support for the latest features of gametel diff --git a/features/with_gametel_option.feature b/features/with_gametel_option.feature index 96abf2f..b6708d5 100644 --- a/features/with_gametel_option.feature +++ b/features/with_gametel_option.feature @@ -1,3 +1,4 @@ +@focus Feature: Adding the --with-gametel flag Scenario: Adding the require_all and gametel gems to Gemfile @@ -5,6 +6,7 @@ Feature: Adding the --with-gametel flag 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'" + And the file "sample/Gemfile" should contain "gem 'rake'" Scenario: Adding gametel to env.rb When I run `testgen project sample --with-gametel` @@ -14,6 +16,12 @@ Feature: Adding the --with-gametel flag 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)" + Scenario: Adding require all to the 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 'require_all'" + And the file "sample/features/support/env.rb" should contain "require_rel 'screens'" + Scenario: Creating the keystore When I run `testgen project sample --with-gametel` Then a file named "sample/features/support/env.rb" should exist @@ -29,7 +37,7 @@ Feature: Adding the --with-gametel flag 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.start(ACTIVITY_NAME_GOES_HERE)" And the file "sample/features/support/env.rb" should contain "server.stop" Scenario: Should not create the hooks file diff --git a/lib/testgen/generators/project/Gemfile.tt b/lib/testgen/generators/project/Gemfile.tt index 5dc7f78..0b53ab1 100644 --- a/lib/testgen/generators/project/Gemfile.tt +++ b/lib/testgen/generators/project/Gemfile.tt @@ -10,5 +10,6 @@ gem 'require_all' <% end -%> <% if with_gametel == 'true' -%> gem 'gametel' +gem 'rake' <% end -%> diff --git a/lib/testgen/generators/project/env.rb.tt b/lib/testgen/generators/project/env.rb.tt index 2e2eff6..5faac20 100644 --- a/lib/testgen/generators/project/env.rb.tt +++ b/lib/testgen/generators/project/env.rb.tt @@ -17,6 +17,9 @@ require_all 'lib' require 'brazenhead' require 'brazenhead/server' require 'gametel' +require 'require_all' + +require_rel 'screens' World(Gametel::Navigation) @@ -35,7 +38,7 @@ end Before do @driver = Driver.new - server.start(APK_NAME_GOES_HERE) + server.start(ACTIVITY_NAME_GOES_HERE) end After do