Skip to content

Commit

Permalink
updated gametel usage
Browse files Browse the repository at this point in the history
  • Loading branch information
cheezy committed Oct 1, 2012
1 parent 5c32847 commit 1cffef9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 9 additions & 1 deletion features/with_gametel_option.feature
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
@focus
Feature: Adding the --with-gametel flag

Scenario: Adding the require_all and gametel gems to Gemfile
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'"
And the file "sample/Gemfile" should contain "gem 'rake'"

Scenario: Adding gametel to env.rb
When I run `testgen project sample --with-gametel`
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/testgen/generators/project/Gemfile.tt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ gem 'require_all'
<% end -%>
<% if with_gametel == 'true' -%>
gem 'gametel'
gem 'rake'
<% end -%>

5 changes: 4 additions & 1 deletion lib/testgen/generators/project/env.rb.tt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ require_all 'lib'
require 'brazenhead'
require 'brazenhead/server'
require 'gametel'
require 'require_all'

require_rel 'screens'

World(Gametel::Navigation)

Expand All @@ -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
Expand Down

0 comments on commit 1cffef9

Please sign in to comment.