testgen 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3 -0
- data/features/testgen_with_pageobject.feature +5 -1
- data/lib/testgen/generators/project.rb +11 -1
- data/lib/testgen/version.rb +1 -1
- metadata +1 -1
data/ChangeLog
CHANGED
@@ -24,4 +24,8 @@ Feature: Adding support for the --pageobject-driver option
|
|
24
24
|
Then a file named "sample/features/support/hooks.rb" should exist
|
25
25
|
And the file "sample/features/support/hooks.rb" should contain "require 'selenium-webdriver'"
|
26
26
|
And the file "sample/features/support/hooks.rb" should contain "@browser = Selenium::Webdriver.for :firefox"
|
27
|
-
|
27
|
+
|
28
|
+
Scenario: Creating the pages directory
|
29
|
+
When I run `testgen project sample --pageobject-driver=selenium`
|
30
|
+
Then a directory named "sample/features/support/pages" should exist
|
31
|
+
|
@@ -41,7 +41,17 @@ module TestGen
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def copy_hooks
|
44
|
-
template "hooks.rb.tt", "#{name}/features/support/hooks.rb" unless
|
44
|
+
template "hooks.rb.tt", "#{name}/features/support/hooks.rb" unless no_driver_selected
|
45
|
+
end
|
46
|
+
|
47
|
+
def create_pages_directory
|
48
|
+
empty_directory("#{name}/features/support/pages") unless no_driver_selected
|
49
|
+
end
|
50
|
+
|
51
|
+
private
|
52
|
+
|
53
|
+
def no_driver_selected
|
54
|
+
pageobject_driver.downcase == 'none'
|
45
55
|
end
|
46
56
|
end
|
47
57
|
end
|
data/lib/testgen/version.rb
CHANGED