ruby_raider 0.4.1 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -6
  3. data/README.md +6 -0
  4. data/lib/commands/scaffolding_commands.rb +2 -2
  5. data/lib/commands/utility_commands.rb +8 -0
  6. data/lib/generators/automation_generator.rb +7 -7
  7. data/lib/generators/common_generator.rb +2 -0
  8. data/lib/generators/cucumber_generator.rb +1 -1
  9. data/lib/generators/helper_generator.rb +6 -0
  10. data/lib/generators/menu_generator.rb +9 -5
  11. data/lib/generators/rspec_generator.rb +2 -2
  12. data/lib/generators/templates/automation/abstract_page.tt +4 -0
  13. data/lib/generators/templates/automation/appium_caps.tt +7 -0
  14. data/lib/generators/templates/automation/home_page.tt +1 -5
  15. data/lib/generators/templates/automation/partials/android_caps.tt +5 -0
  16. data/lib/generators/templates/automation/partials/cross_platform_caps.tt +14 -0
  17. data/lib/generators/templates/automation/partials/home_page_selector.tt +8 -0
  18. data/lib/generators/templates/automation/partials/ios_caps.tt +6 -0
  19. data/lib/generators/templates/automation/partials/pdp_page_selector.tt +8 -0
  20. data/lib/generators/templates/automation/pdp_page.tt +1 -5
  21. data/lib/generators/templates/common/config.tt +5 -2
  22. data/lib/generators/templates/common/partials/mobile_config.tt +1 -0
  23. data/lib/generators/templates/common/partials/web_config.tt +2 -0
  24. data/lib/generators/templates/common/read_me.tt +4 -0
  25. data/lib/generators/templates/helpers/appium_helper.tt +29 -0
  26. data/lib/generators/templates/helpers/driver_helper.tt +15 -2
  27. data/lib/generators/templates/helpers/partials/driver_and_options.tt +8 -5
  28. data/lib/generators/templates/helpers/raider_helper.tt +3 -0
  29. data/lib/utilities/utilities.rb +5 -0
  30. data/ruby_raider.gemspec +2 -1
  31. data/spec/automation_generator_spec.rb +33 -150
  32. data/spec/common_generator_spec.rb +58 -105
  33. data/spec/cucumber_generator_spec.rb +18 -53
  34. data/spec/helpers_generator_spec.rb +73 -90
  35. data/spec/rspec_generator_spec.rb +15 -61
  36. data/spec/scaffolding_commands_spec.rb +162 -0
  37. data/spec/spec_helper.rb +20 -0
  38. metadata +26 -6
  39. data/lib/generators/templates/automation/appium_settings.tt +0 -5
  40. data/lib/generators/templates/automation/partials/android_settings.tt +0 -8
  41. data/lib/generators/templates/automation/partials/ios_settings.tt +0 -8
  42. data/spec/scaffolding_spec.rb +0 -234
@@ -4,192 +4,75 @@ require_relative '../lib/generators/automation_generator'
4
4
  require_relative 'spec_helper'
5
5
 
6
6
  describe AutomationGenerator do
7
- context 'with selenium' do
8
- before(:all) do
9
- @name = 'rspec-selenium'
10
- AutomationGenerator.new(['selenium', 'rspec', @name]).invoke_all
11
- end
12
-
13
- it 'creates a login page file' do
14
- expect(File.exist?("#{@name}/page_objects/pages/login_page.rb")).to be_truthy
15
- end
16
-
17
- it 'creates an abstract page file' do
18
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
19
- end
20
-
21
- it 'creates an abstract component file' do
22
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_component.rb")).to be_truthy
23
- end
24
-
25
- it 'creates a component file' do
26
- expect(File.exist?("#{@name}/page_objects/components/header_component.rb")).to be_truthy
27
- end
28
-
29
- after(:all) do
30
- FileUtils.rm_rf(@name)
31
- end
32
- end
33
-
34
- context 'with watir' do
35
- before(:all) do
36
- @name = 'rspec-watir'
37
- AutomationGenerator.new(['watir', 'rspec', @name]).invoke_all
38
- end
39
-
7
+ shared_examples 'creates web automation files' do |name|
40
8
  it 'creates a login page file' do
41
- expect(File.exist?("#{@name}/page_objects/pages/login_page.rb")).to be_truthy
9
+ expect(File).to exist("#{name}/page_objects/pages/login_page.rb")
42
10
  end
43
11
 
44
12
  it 'creates an abstract page file' do
45
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
13
+ expect(File).to exist("#{name}/page_objects/abstract/abstract_page.rb")
46
14
  end
47
15
 
48
16
  it 'creates an abstract component file' do
49
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_component.rb")).to be_truthy
17
+ expect(File).to exist("#{name}/page_objects/abstract/abstract_component.rb")
50
18
  end
51
19
 
52
20
  it 'creates a component file' do
53
- expect(File.exist?("#{@name}/page_objects/components/header_component.rb")).to be_truthy
54
- end
55
-
56
- after(:all) do
57
- FileUtils.rm_rf(@name)
21
+ expect(File).to exist("#{name}/page_objects/components/header_component.rb")
58
22
  end
59
23
  end
60
24
 
61
- context 'with rspec and appium on ios' do
62
- before(:all) do
63
- @name = 'rspec-appium-ios'
64
- AutomationGenerator.new(['ios', 'rspec', @name]).invoke_all
65
- end
66
-
25
+ shared_examples 'creates mobile automation files' do |name|
67
26
  it 'creates a home page file' do
68
- expect(File.exist?("#{@name}/page_objects/pages/home_page.rb")).to be_truthy
27
+ expect(File).to exist("#{name}/page_objects/pages/home_page.rb")
69
28
  end
70
29
 
71
30
  it 'creates an abstract page file' do
72
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
31
+ expect(File).to exist("#{name}/page_objects/abstract/abstract_page.rb")
73
32
  end
74
33
 
75
34
  it 'creates a pdp page file' do
76
- expect(File.exist?("#{@name}/page_objects/pages/pdp_page.rb")).to be_truthy
77
- end
78
-
79
- it 'creates an appium config file' do
80
- expect(File.exist?("#{@name}/appium.txt")).to be_truthy
81
- end
82
-
83
- after(:all) do
84
- FileUtils.rm_rf(@name)
35
+ expect(File).to exist("#{name}/page_objects/pages/pdp_page.rb")
85
36
  end
86
37
  end
87
38
 
88
- context 'with rspec and appium on android' do
89
- before(:all) do
90
- @name = 'rspec-appium-android'
91
- AutomationGenerator.new(['android', 'rspec', @name]).invoke_all
92
- end
93
-
94
- it 'creates a home page file' do
95
- expect(File.exist?("#{@name}/page_objects/pages/home_page.rb")).to be_truthy
96
- end
97
-
98
- it 'creates an abstract page file' do
99
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
100
- end
101
-
102
- it 'creates a pdp page file' do
103
- expect(File.exist?("#{@name}/page_objects/pages/pdp_page.rb")).to be_truthy
104
- end
105
-
106
- it 'creates an appium config file' do
107
- expect(File.exist?("#{@name}/appium.txt")).to be_truthy
108
- end
39
+ context 'with rspec and selenium' do
40
+ include_examples 'creates web automation files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[2]}"
41
+ end
109
42
 
110
- after(:all) do
111
- FileUtils.rm_rf(@name)
112
- end
43
+ context 'with rspec and watir' do
44
+ include_examples 'creates web automation files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[3]}"
113
45
  end
114
46
 
115
47
  context 'with cucumber and selenium' do
116
- before(:all) do
117
- @name = 'cucumber-selenium'
118
- AutomationGenerator.new(['selenium', 'cucumber', @name]).invoke_all
119
- end
120
-
121
- it 'creates a login page file' do
122
- expect(File.exist?("#{@name}/page_objects/pages/login_page.rb")).to be_truthy
123
- end
124
-
125
- it 'creates an abstract page file' do
126
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
127
- end
128
-
129
- it 'creates an abstract component file' do
130
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_component.rb")).to be_truthy
131
- end
132
-
133
- it 'creates a component file' do
134
- expect(File.exist?("#{@name}/page_objects/components/header_component.rb")).to be_truthy
135
- end
136
-
137
- after(:all) do
138
- FileUtils.rm_rf(@name)
139
- end
48
+ include_examples 'creates web automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[2]}"
140
49
  end
141
50
 
142
51
  context 'with cucumber and watir' do
143
- before(:all) do
144
- @name = 'cucumber-watir'
145
- AutomationGenerator.new(['watir', 'cucumber', @name]).invoke_all
146
- end
147
-
148
- it 'creates a login page file' do
149
- expect(File.exist?("#{@name}/page_objects/pages/login_page.rb")).to be_truthy
150
- end
151
-
152
- it 'creates an abstract page file' do
153
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
154
- end
155
-
156
- it 'creates an abstract component file' do
157
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_component.rb")).to be_truthy
158
- end
159
-
160
- it 'creates a component file' do
161
- expect(File.exist?("#{@name}/page_objects/components/header_component.rb")).to be_truthy
162
- end
163
-
164
- after(:all) do
165
- FileUtils.rm_rf(@name)
166
- end
52
+ include_examples 'creates web automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[3]}"
167
53
  end
168
54
 
169
- context 'with cucumber and appium' do
170
- before(:all) do
171
- @name = 'cucumber-appium'
172
- AutomationGenerator.new(['ios', 'cucumber', @name]).invoke_all
173
- end
55
+ context 'with rspec and appium android' do
56
+ include_examples 'creates mobile automation files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.first}"
57
+ end
174
58
 
175
- it 'creates a home page file' do
176
- expect(File.exist?("#{@name}/page_objects/pages/home_page.rb")).to be_truthy
177
- end
59
+ context 'with rspec and appium ios' do
60
+ include_examples 'creates mobile automation files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[1]}"
61
+ end
178
62
 
179
- it 'creates an abstract page file' do
180
- expect(File.exist?("#{@name}/page_objects/abstract/abstract_page.rb")).to be_truthy
181
- end
63
+ context 'with cucumber and appium android' do
64
+ include_examples 'creates mobile automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.first}"
65
+ end
182
66
 
183
- it 'creates a pdp page file' do
184
- expect(File.exist?("#{@name}/page_objects/pages/pdp_page.rb")).to be_truthy
185
- end
67
+ context 'with cucumber and appium ios' do
68
+ include_examples 'creates mobile automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[1]}"
69
+ end
186
70
 
187
- it 'creates an appium config file' do
188
- expect(File.exist?("#{@name}/appium.txt")).to be_truthy
189
- end
71
+ context 'with cucumber and appium cross platform' do
72
+ include_examples 'creates mobile automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}"
73
+ end
190
74
 
191
- after(:all) do
192
- FileUtils.rm_rf(@name)
193
- end
75
+ context 'with cucumber and appium cross platform' do
76
+ include_examples 'creates mobile automation files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}"
194
77
  end
195
78
  end
@@ -4,138 +4,91 @@ require_relative '../lib/generators/common_generator'
4
4
  require_relative 'spec_helper'
5
5
 
6
6
  describe CommonGenerator do
7
- context 'with selenium' do
8
- before(:all) do
9
- @name = 'rspec-selenium'
10
- CommonGenerator.new(['selenium', 'rspec', @name]).invoke_all
11
- end
12
-
13
- it 'creates a config file' do
14
- expect(File.exist?("#{@name}/config/config.yml")).to be_truthy
15
- end
16
-
7
+ shared_examples 'creates common files' do |name|
17
8
  it 'creates a rake file' do
18
- expect(File.exist?("#{@name}/Rakefile")).to be_truthy
9
+ expect(File).to exist("#{name}/Rakefile")
19
10
  end
20
11
 
21
12
  it 'creates a readMe file' do
22
- expect(File.exist?("#{@name}/Readme.md")).to be_truthy
13
+ expect(File).to exist("#{name}/Readme.md")
23
14
  end
24
15
 
25
16
  it 'creates a gemfile file' do
26
- expect(File.exist?("#{@name}/Gemfile")).to be_truthy
27
- end
28
-
29
- after(:all) do
30
- FileUtils.rm_rf(@name)
17
+ expect(File).to exist("#{name}/Gemfile")
31
18
  end
32
19
  end
33
20
 
34
- context 'with watir' do
35
- before(:all) do
36
- @name = 'rspec-watir'
37
- CommonGenerator.new(['watir', 'rspec', @name]).invoke_all
38
- end
39
-
21
+ shared_examples 'creates a config file' do |name|
40
22
  it 'creates a config file' do
41
- expect(File.exist?("#{@name}/config/config.yml")).to be_truthy
42
- end
43
-
44
- it 'creates a rake file' do
45
- expect(File.exist?("#{@name}/Rakefile")).to be_truthy
46
- end
47
-
48
- it 'creates a readMe file' do
49
- expect(File.exist?("#{@name}/Readme.md")).to be_truthy
50
- end
51
-
52
- it 'creates a gemfile file' do
53
- expect(File.exist?("#{@name}/Gemfile")).to be_truthy
54
- end
55
-
56
- after(:all) do
57
- FileUtils.rm_rf(@name)
23
+ expect(File).to exist("#{name}/config/config.yml")
58
24
  end
59
25
  end
60
26
 
61
- context 'with appium' do
62
- before(:all) do
63
- @name = 'rspec-appium'
64
- CommonGenerator.new(['appium_ios', 'rspec', @name]).invoke_all
65
- end
66
-
27
+ shared_examples 'creates a capabilities file' do |name|
67
28
  it 'creates a config file' do
68
- expect(File.exist?("#{@name}/config/config.yml")).to be_truthy
69
- end
70
-
71
- it 'creates a rake file' do
72
- expect(File.exist?("#{@name}/Rakefile")).to be_truthy
73
- end
74
-
75
- it 'creates a readMe file' do
76
- expect(File.exist?("#{@name}/Readme.md")).to be_truthy
77
- end
78
-
79
- it 'creates a gemfile file' do
80
- expect(File.exist?("#{@name}/Gemfile")).to be_truthy
29
+ expect(File).to exist("#{name}/config/capabilities.yml")
81
30
  end
31
+ end
82
32
 
83
- after(:all) do
84
- FileUtils.rm_rf(@name)
33
+ shared_examples "doesn't create a config file" do |name|
34
+ it "doesn't create a config file" do
35
+ expect(File).to_not exist("#{name}/config/config.yml")
85
36
  end
37
+ end
86
38
 
87
- context 'with cucumber and selenium' do
88
- before(:all) do
89
- @name = 'cucumber-selenium'
90
- CommonGenerator.new(['selenium', 'cucumber', @name]).invoke_all
91
- end
92
-
93
- it 'creates a config file' do
94
- expect(File.exist?("#{@name}/config/config.yml")).to be_truthy
95
- end
96
-
97
- it 'creates a rake file' do
98
- expect(File.exist?("#{@name}/Rakefile")).to be_truthy
99
- end
39
+ context 'with rspec and selenium' do
40
+ include_examples 'creates common files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[2]}"
41
+ include_examples 'creates a config file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[2]}"
42
+ end
100
43
 
101
- it 'creates a readMe file' do
102
- expect(File.exist?("#{@name}/Readme.md")).to be_truthy
103
- end
44
+ context 'with rspec and watir' do
45
+ include_examples 'creates common files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[3]}"
46
+ include_examples 'creates a config file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[3]}"
47
+ end
104
48
 
105
- it 'creates a gemfile file' do
106
- expect(File.exist?("#{@name}/Gemfile")).to be_truthy
107
- end
49
+ context 'with cucumber and selenium' do
50
+ include_examples 'creates common files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[2]}"
51
+ include_examples 'creates a config file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[2]}"
52
+ end
108
53
 
109
- after(:all) do
110
- FileUtils.rm_rf(@name)
111
- end
112
- end
54
+ context 'with cucumber and watir' do
55
+ include_examples 'creates common files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[3]}"
56
+ include_examples 'creates a config file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[3]}"
57
+ end
113
58
 
114
- context 'with cucumber and watir' do
115
- before(:all) do
116
- @name = 'cucumber-watir'
117
- CommonGenerator.new(['watir', 'cucumber', @name]).invoke_all
118
- end
59
+ context 'with rspec and appium android' do
60
+ include_examples 'creates common files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.first}"
61
+ include_examples 'creates a capabilities file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.first}"
62
+ include_examples "doesn't create a config file", "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.first}"
63
+ end
119
64
 
120
- it 'creates a config file' do
121
- expect(File.exist?("#{@name}/config/config.yml")).to be_truthy
122
- end
65
+ context 'with rspec and appium ios' do
66
+ include_examples 'creates common files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[1]}"
67
+ include_examples 'creates a capabilities file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[1]}"
68
+ include_examples "doesn't create a config file", "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[1]}"
69
+ end
123
70
 
124
- it 'creates a rake file' do
125
- expect(File.exist?("#{@name}/Rakefile")).to be_truthy
126
- end
71
+ context 'with cucumber and appium android' do
72
+ include_examples 'creates common files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.first}"
73
+ include_examples 'creates a capabilities file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.first}"
74
+ include_examples "doesn't create a config file", "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.first}"
75
+ end
127
76
 
128
- it 'creates a readMe file' do
129
- expect(File.exist?("#{@name}/Readme.md")).to be_truthy
130
- end
77
+ context 'with cucumber and appium ios' do
78
+ include_examples 'creates common files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[1]}"
79
+ include_examples 'creates a capabilities file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[1]}"
80
+ include_examples "doesn't create a config file", "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[1]}"
81
+ end
131
82
 
132
- it 'creates a gemfile file' do
133
- expect(File.exist?("#{@name}/Gemfile")).to be_truthy
134
- end
83
+ context 'with cucumber and appium cross platform' do
84
+ include_examples 'creates common files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}"
85
+ include_examples 'creates a capabilities file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}"
86
+ include_examples 'creates a config file', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}"
87
+ end
135
88
 
136
- after(:all) do
137
- FileUtils.rm_rf(@name)
138
- end
139
- end
89
+ context 'with rspec and appium cross platform' do
90
+ include_examples 'creates common files', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.last}"
91
+ include_examples 'creates a capabilities file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.last}"
92
+ include_examples 'creates a config file', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES.last}"
140
93
  end
141
94
  end
@@ -4,76 +4,41 @@ require_relative '../lib/generators/cucumber_generator'
4
4
  require_relative 'spec_helper'
5
5
 
6
6
  describe CucumberGenerator do
7
- context 'with selenium' do
8
- before(:all) do
9
- @name = 'cucumber-selenium'
10
- CucumberGenerator.new(['selenium', 'cucumber', @name]).invoke_all
11
- end
12
-
7
+ shared_examples 'creates cucumber files' do |project_name, file_name|
13
8
  it 'creates a feature file' do
14
- expect(File.exist?("#{@name}/features/login.feature")).to be_truthy
9
+ expect(File).to exist("#{project_name}/features/#{file_name}.feature")
15
10
  end
16
11
 
17
12
  it 'creates a step definitions file' do
18
- expect(File.exist?("#{@name}/features/step_definitions/login_steps.rb")).to be_truthy
13
+ expect(File).to exist("#{project_name}/features/step_definitions/#{file_name}_steps.rb")
19
14
  end
20
15
 
21
16
  it 'creates an env file' do
22
- expect(File.exist?("#{@name}/features/support/env.rb")).to be_truthy
17
+ expect(File).to exist("#{project_name}/features/support/env.rb")
23
18
  end
24
19
 
25
20
  it 'does not create a spec file' do
26
- expect(File.exist?("#{@name}/spec/login_spec.rb")).to be_falsey
27
- end
28
-
29
- after(:all) do
30
- FileUtils.rm_rf(@name)
21
+ expect(File).not_to exist("#{project_name}/spec/home_spec.rb")
31
22
  end
32
23
  end
33
24
 
34
- context 'with watir' do
35
- before(:all) do
36
- @name = 'cucumber-watir'
37
- CucumberGenerator.new(['watir', 'cucumber', @name]).invoke_all
38
- end
39
-
40
- it 'creates a feature file' do
41
- expect(File.exist?("#{@name}/features/login.feature")).to be_truthy
42
- end
43
-
44
- it 'creates a step definitions file' do
45
- expect(File.exist?("#{@name}/features/step_definitions/login_steps.rb")).to be_truthy
46
- end
47
-
48
- it 'creates an env file' do
49
- expect(File.exist?("#{@name}/features/support/env.rb")).to be_truthy
50
- end
51
-
52
- after(:all) do
53
- FileUtils.rm_rf(@name)
54
- end
25
+ context 'with cucumber and appium android' do
26
+ include_examples 'creates cucumber files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.first}", 'home'
55
27
  end
56
28
 
57
- context 'with appium' do
58
- before(:all) do
59
- @name = 'cucumber-appium'
60
- CucumberGenerator.new(['appium_ios', 'cucumber', @name]).invoke_all
61
- end
62
-
63
- it 'creates a feature file' do
64
- expect(File.exist?("#{@name}/features/login.feature")).to be_truthy
65
- end
29
+ context 'with cucumber and appium ios' do
30
+ include_examples 'creates cucumber files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[1]}", 'home'
31
+ end
66
32
 
67
- it 'creates a step definitions file' do
68
- expect(File.exist?("#{@name}/features/step_definitions/login_steps.rb")).to be_truthy
69
- end
33
+ context 'with cucumber and appium cross platform' do
34
+ include_examples 'creates cucumber files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES.last}", 'home'
35
+ end
70
36
 
71
- it 'creates an env file' do
72
- expect(File.exist?("#{@name}/features/support/env.rb")).to be_truthy
73
- end
37
+ context 'with cucumber and selenium' do
38
+ include_examples 'creates cucumber files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[2]}", 'login'
39
+ end
74
40
 
75
- after(:all) do
76
- FileUtils.rm_rf(@name)
77
- end
41
+ context 'with cucumber and watir' do
42
+ include_examples 'creates cucumber files', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[3]}", 'login'
78
43
  end
79
44
  end