testgen 0.4 → 0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ === Version 0.5 / 2012-09-24
2
+ * Added support for the latest features of gametel
3
+
1
4
  === Version 0.4 / 2012-08-20
2
5
  * Added support for gametel by using the --with-gametel option
3
6
 
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source "http://rubygems.org"
3
3
  gem 'rake'
4
4
  gem 'fuubar'
5
5
  gem 'fuubar-cucumber'
6
+ gem 'rb-fsevent', '~> 0.9.1'
6
7
  gem 'growl'
7
8
  gem 'guard-rspec'
8
9
  gem 'guard-cucumber'
data/Guardfile CHANGED
@@ -6,5 +6,6 @@ guard 'cucumber', :notification => true, :all_after_pass => true, :cli => '--pro
6
6
  watch(%r{^features/support/.+$}) { 'features' }
7
7
  watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' }
8
8
  watch(%r{^lib/.+\.rb$}) { "features" }
9
+ watch(%r{^lib/.+\.tt$}) { "features" }
9
10
  watch(%r{^cucumber.yml$}) { "features" }
10
11
  end
@@ -6,20 +6,40 @@ Feature: Adding the --with-gametel flag
6
6
  And the file "sample/Gemfile" should contain "gem 'require_all'"
7
7
  And the file "sample/Gemfile" should contain "gem 'gametel'"
8
8
 
9
- Scenario: Adding page-object to env.rb
9
+ Scenario: Adding gametel to env.rb
10
10
  When I run `testgen project sample --with-gametel`
11
11
  Then a file named "sample/features/support/env.rb" should exist
12
+ And the file "sample/features/support/env.rb" should contain "require 'brazenhead'"
13
+ And the file "sample/features/support/env.rb" should contain "require 'brazenhead/server'"
12
14
  And the file "sample/features/support/env.rb" should contain "require 'gametel'"
13
- And the file "sample/features/support/env.rb" should contain "World(Gametel::Navigation)"
15
+ And the file "sample/features/support/env.rb" should contain "World(Gametel::Navigation)"
16
+
17
+ Scenario: Creating the keystore
18
+ When I run `testgen project sample --with-gametel`
19
+ Then a file named "sample/features/support/env.rb" should exist
20
+ And the file "sample/features/support/env.rb" should contain "keystore = {"
21
+ And the file "sample/features/support/env.rb" should contain ":path => File.expand_path('~/.android/debug.keystore')"
22
+ And the file "sample/features/support/env.rb" should contain ":alias => 'androiddebugkey'"
23
+ And the file "sample/features/support/env.rb" should contain ":password => 'android'"
24
+ And the file "sample/features/support/env.rb" should contain ":keystore_password => 'android'"
25
+
26
+ Scenario: Creating the Driver and hooks
27
+ When I run `testgen project sample --with-gametel`
28
+ Then a file named "sample/features/support/env.rb" should exist
29
+ And the file "sample/features/support/env.rb" should contain "server = Brazenhead::Server.new(PATH_TO_APK, keystore)"
30
+ And the file "sample/features/support/env.rb" should contain "class Driver"
31
+ And the file "sample/features/support/env.rb" should contain "@driver = Driver.new"
32
+ And the file "sample/features/support/env.rb" should contain "server.start(APK_NAME_GOES_HERE)"
33
+ And the file "sample/features/support/env.rb" should contain "server.stop"
14
34
 
15
35
  Scenario: Should not create the hooks file
16
36
  When I run `testgen project sample --with-gametel`
17
37
  Then a file named "sample/features/support/hooks.rb" should not exist
18
38
 
19
- Scenario: Creating the pages directory under support
39
+ Scenario: Creating the screens directory under support
20
40
  When I run `testgen project sample --with-gametel`
21
41
  Then a directory named "sample/features/support/screens" should exist
22
42
 
23
- Scenario: Creating the pages directory under lib when using --wth-lib
43
+ Scenario: Creating the screens directory under lib when using --wth-lib
24
44
  When I run `testgen project sample --with-gametel --with-lib`
25
45
  Then a directory named "sample/lib/screens" should exist
@@ -14,9 +14,33 @@ require_all 'lib'
14
14
  <% end -%>
15
15
 
16
16
  <% if with_gametel == 'true' -%>
17
+ require 'brazenhead'
18
+ require 'brazenhead/server'
17
19
  require 'gametel'
18
20
 
19
21
  World(Gametel::Navigation)
22
+
23
+ keystore = {
24
+ :path => File.expand_path('~/.android/debug.keystore'),
25
+ :alias => 'androiddebugkey',
26
+ :password => 'android',
27
+ :keystore_password => 'android'
28
+ }
29
+
30
+ server = Brazenhead::Server.new(PATH_TO_APK, keystore)
31
+
32
+ class Driver
33
+ include Brazenhead
34
+ end
35
+
36
+ Before do
37
+ @driver = Driver.new
38
+ server.start(APK_NAME_GOES_HERE)
39
+ end
40
+
41
+ After do
42
+ server.stop
43
+ end
20
44
  <% end -%>
21
45
 
22
46
  <% unless pageobject_driver.downcase == 'none' -%>
@@ -1,3 +1,3 @@
1
1
  module TestGen
2
- VERSION = "0.4"
2
+ VERSION = "0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testgen
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: '0.5'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-20 00:00:00.000000000 Z
12
+ date: 2012-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -154,7 +154,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
154
  version: '0'
155
155
  segments:
156
156
  - 0
157
- hash: 1677098905194904714
157
+ hash: 3148347960850805763
158
158
  required_rubygems_version: !ruby/object:Gem::Requirement
159
159
  none: false
160
160
  requirements:
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  version: '0'
164
164
  segments:
165
165
  - 0
166
- hash: 1677098905194904714
166
+ hash: 3148347960850805763
167
167
  requirements: []
168
168
  rubyforge_project: testgen
169
169
  rubygems_version: 1.8.24