itms_automation 2.1 → 2.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/generate.rb +3 -37
- data/bin/helper.rb +23 -10
- data/bin/itms_automation +18 -23
- data/doc/installation.md +16 -0
- data/doc/itms-automation-API.md +103 -0
- data/doc/itms-automation-help.md +18 -0
- data/example/android/android_app/android_app_calculator.zip +0 -0
- data/example/android/android_app/android_app_calculator/AndroidCalculator.apk +0 -0
- data/example/android/android_app/android_app_calculator/features/calculator.feature +36 -0
- data/example/android/android_app/android_app_calculator/features/my_first.feature +13 -0
- data/example/android/android_app/android_app_calculator/features/screenshots/test.png +0 -0
- data/example/android/android_app/android_app_calculator/features/step_definitions/custom_steps.rb +5 -0
- data/example/android/android_app/android_app_calculator/features/support/env.rb +52 -0
- data/example/android/android_app/android_app_calculator/features/support/hooks.rb +26 -0
- data/example/android/android_web/android_web_gmail_login.zip +0 -0
- data/example/android/android_web/android_web_gmail_login/features/gmail_login.feature +12 -0
- data/example/android/android_web/android_web_gmail_login/features/my_first.feature +1 -0
- data/example/android/android_web/android_web_gmail_login/features/screenshots/test.png +0 -0
- data/example/android/android_web/android_web_gmail_login/features/step_definitions/custom_steps.rb +5 -0
- data/example/android/android_web/android_web_gmail_login/features/support/env.rb +51 -0
- data/example/android/android_web/android_web_gmail_login/features/support/hooks.rb +27 -0
- data/example/desktop web/desktop_web_gmail_login.zip +0 -0
- data/example/desktop web/desktop_web_gmail_login/features/gmail_login.feature +9 -0
- data/example/desktop web/desktop_web_gmail_login/features/gmail_multi_login.feature +21 -0
- data/example/desktop web/desktop_web_gmail_login/features/my_first.feature +1 -0
- data/example/desktop web/desktop_web_gmail_login/features/screenshots/test.png +0 -0
- data/example/desktop web/desktop_web_gmail_login/features/step_definitions/custom_steps.rb +5 -0
- data/example/desktop web/desktop_web_gmail_login/features/support/env.rb +51 -0
- data/example/desktop web/desktop_web_gmail_login/features/support/hooks.rb +26 -0
- data/features-skeleton/my_first.feature +5 -0
- data/features-skeleton/screenshots/test.png +0 -0
- data/features-skeleton/step_definitions/custom_steps.rb +5 -0
- data/features-skeleton/support/env.rb +104 -0
- data/features-skeleton/support/hooks.rb +74 -0
- data/lib/itms_automation.rb +1 -3
- data/lib/itms_automation/assertion_steps.rb +68 -0
- data/lib/itms_automation/click_elements_steps.rb +24 -0
- data/lib/itms_automation/configuration_steps.rb +7 -0
- data/lib/itms_automation/input_steps.rb +59 -0
- data/lib/itms_automation/javascript_handling_steps.rb +10 -0
- data/lib/itms_automation/methods/assertion_methods.rb +344 -0
- data/lib/itms_automation/methods/click_elements_methods.rb +23 -0
- data/lib/itms_automation/methods/configuration_methods.rb +35 -0
- data/lib/itms_automation/methods/error_handling_methods.rb +87 -0
- data/lib/itms_automation/methods/input_methods.rb +69 -0
- data/lib/itms_automation/methods/javascript_handling_methods.rb +9 -0
- data/lib/itms_automation/methods/misc_methods.rb +47 -0
- data/lib/itms_automation/methods/navigate_methods.rb +123 -0
- data/lib/itms_automation/methods/progress_methods.rb +15 -0
- data/lib/itms_automation/methods/required_files.rb +9 -0
- data/lib/itms_automation/methods/screenshot_methods.rb +6 -0
- data/lib/itms_automation/navigation_steps.rb +79 -0
- data/lib/itms_automation/progress_steps.rb +17 -0
- data/lib/itms_automation/screenshot_steps.rb +6 -0
- data/lib/itms_automation/version.rb +5 -3
- metadata +84 -102
- data/bin/console +0 -14
- data/bin/documentation_generator.rb +0 -119
- data/bin/setup +0 -8
- data/lib/itms_automation/all_steps.rb +0 -8
- data/lib/itms_automation/assertion_helper.rb +0 -29
- data/lib/itms_automation/auto_util.rb +0 -694
- data/lib/itms_automation/database_steps_helper.rb +0 -125
- data/lib/itms_automation/web_steps_helper.rb +0 -606
- data/project/Gemfile +0 -3
- data/project/Gemfile.lock +0 -92
- data/project/README.md +0 -34
- data/project/Rakefile +0 -24
- data/project/config/chrome_headless_options.yaml +0 -1
- data/project/config/chrome_options.yaml +0 -6
- data/project/config/firefox_headless_options.yaml +0 -1
- data/project/config/firefox_options.yaml +0 -1
- data/project/config/ie_options.yaml +0 -1
- data/project/config/remote_options.yaml +0 -6
- data/project/config/safari_options.yaml +0 -1
- data/project/cucumber.yml +0 -4
- data/project/features/TestSuite/WebGUI.feature +0 -5
- data/project/features/step_definitions/lib_steps/steps_definition.rb +0 -46
- data/project/features/step_definitions/repositories/project_object.yml +0 -26
- data/project/features/support/env.rb +0 -9
- data/project/features/support/hooks.rb +0 -130
@@ -0,0 +1,17 @@
|
|
1
|
+
# require 'cucumber'
|
2
|
+
# require_relative 'methods/progress_methods'
|
3
|
+
|
4
|
+
# # wait for specific period of time
|
5
|
+
# Then(/^I wait for (\d+) sec$/) do |time|
|
6
|
+
# wait(time)
|
7
|
+
# end
|
8
|
+
|
9
|
+
# # wait for specific element to display for specific period of time
|
10
|
+
# Then(/^I wait (\d+) seconds for element "(.*?)" to display$/) do |duration, element|
|
11
|
+
# wait_for_element_to_display(element, duration)
|
12
|
+
# end
|
13
|
+
|
14
|
+
# # wait for specific element to enable for specific period of time
|
15
|
+
# Then(/^I wait (\d+) seconds for element "(.*?)" to enable$/) do |duration, element|
|
16
|
+
# wait_for_element_to_enable(element, duration)
|
17
|
+
# end
|
metadata
CHANGED
@@ -1,177 +1,159 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itms_automation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- INFOdation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: cucumber
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 3.6.0
|
20
17
|
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version: '3
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
19
|
+
version: '1.3'
|
27
20
|
- - ">="
|
28
21
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.
|
30
|
-
- - "~>"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '3.6'
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: cucumber
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '3.1'
|
22
|
+
version: 1.3.18
|
40
23
|
type: :runtime
|
41
24
|
prerelease: false
|
42
25
|
version_requirements: !ruby/object:Gem::Requirement
|
43
26
|
requirements:
|
44
27
|
- - "~>"
|
45
28
|
- !ruby/object:Gem::Version
|
46
|
-
version: '3
|
29
|
+
version: '1.3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.3.18
|
47
33
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
34
|
+
name: selenium-webdriver
|
49
35
|
requirement: !ruby/object:Gem::Requirement
|
50
36
|
requirements:
|
51
37
|
- - "~>"
|
52
38
|
- !ruby/object:Gem::Version
|
53
|
-
version: 3.
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 3.29.0
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: rspec
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
39
|
+
version: '3.14'
|
65
40
|
- - ">="
|
66
41
|
- !ruby/object:Gem::Version
|
67
|
-
version: 3.
|
68
|
-
- - "~>"
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '3.8'
|
42
|
+
version: 3.14.1
|
71
43
|
type: :runtime
|
72
44
|
prerelease: false
|
73
45
|
version_requirements: !ruby/object:Gem::Requirement
|
74
46
|
requirements:
|
75
|
-
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 3.8.0
|
78
47
|
- - "~>"
|
79
48
|
- !ruby/object:Gem::Version
|
80
|
-
version: '3.
|
49
|
+
version: '3.14'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 3.14.1
|
81
53
|
- !ruby/object:Gem::Dependency
|
82
|
-
name:
|
54
|
+
name: appium_lib_core
|
83
55
|
requirement: !ruby/object:Gem::Requirement
|
84
56
|
requirements:
|
85
57
|
- - "~>"
|
86
58
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
59
|
+
version: 3.10.1
|
88
60
|
- - ">="
|
89
61
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
62
|
+
version: 3.10.1
|
91
63
|
type: :runtime
|
92
64
|
prerelease: false
|
93
65
|
version_requirements: !ruby/object:Gem::Requirement
|
94
66
|
requirements:
|
95
67
|
- - "~>"
|
96
68
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
69
|
+
version: 3.10.1
|
98
70
|
- - ">="
|
99
71
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
72
|
+
version: 3.10.1
|
101
73
|
- !ruby/object:Gem::Dependency
|
102
|
-
name:
|
74
|
+
name: httparty
|
103
75
|
requirement: !ruby/object:Gem::Requirement
|
104
76
|
requirements:
|
105
|
-
- - ">="
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: '1.8'
|
108
77
|
- - "~>"
|
109
78
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
111
|
-
type: :runtime
|
112
|
-
prerelease: false
|
113
|
-
version_requirements: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
79
|
+
version: 0.13.7
|
115
80
|
- - ">="
|
116
81
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
118
|
-
- - "~>"
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: '1.8'
|
121
|
-
- !ruby/object:Gem::Dependency
|
122
|
-
name: cucumber_priority
|
123
|
-
requirement: !ruby/object:Gem::Requirement
|
124
|
-
requirements:
|
125
|
-
- - "~>"
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: 0.3.2
|
82
|
+
version: 0.13.7
|
128
83
|
type: :runtime
|
129
84
|
prerelease: false
|
130
85
|
version_requirements: !ruby/object:Gem::Requirement
|
131
86
|
requirements:
|
132
87
|
- - "~>"
|
133
88
|
- !ruby/object:Gem::Version
|
134
|
-
version: 0.
|
89
|
+
version: 0.13.7
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: 0.13.7
|
135
93
|
description: Behavior driven development (BDD) approach to write automation test script
|
136
|
-
to test
|
137
|
-
email:
|
138
|
-
- anhpq.info@gmail.com
|
94
|
+
to test Web and Android applications.
|
95
|
+
email: anh.pham@infodation.vn
|
139
96
|
executables:
|
140
97
|
- itms_automation
|
141
98
|
extensions: []
|
142
99
|
extra_rdoc_files: []
|
143
100
|
files:
|
144
|
-
- bin/console
|
145
|
-
- bin/documentation_generator.rb
|
146
101
|
- bin/generate.rb
|
147
102
|
- bin/helper.rb
|
148
103
|
- bin/itms_automation
|
149
|
-
-
|
104
|
+
- doc/installation.md
|
105
|
+
- doc/itms-automation-API.md
|
106
|
+
- doc/itms-automation-help.md
|
107
|
+
- example/android/android_app/android_app_calculator.zip
|
108
|
+
- example/android/android_app/android_app_calculator/AndroidCalculator.apk
|
109
|
+
- example/android/android_app/android_app_calculator/features/calculator.feature
|
110
|
+
- example/android/android_app/android_app_calculator/features/my_first.feature
|
111
|
+
- example/android/android_app/android_app_calculator/features/screenshots/test.png
|
112
|
+
- example/android/android_app/android_app_calculator/features/step_definitions/custom_steps.rb
|
113
|
+
- example/android/android_app/android_app_calculator/features/support/env.rb
|
114
|
+
- example/android/android_app/android_app_calculator/features/support/hooks.rb
|
115
|
+
- example/android/android_web/android_web_gmail_login.zip
|
116
|
+
- example/android/android_web/android_web_gmail_login/features/gmail_login.feature
|
117
|
+
- example/android/android_web/android_web_gmail_login/features/my_first.feature
|
118
|
+
- example/android/android_web/android_web_gmail_login/features/screenshots/test.png
|
119
|
+
- example/android/android_web/android_web_gmail_login/features/step_definitions/custom_steps.rb
|
120
|
+
- example/android/android_web/android_web_gmail_login/features/support/env.rb
|
121
|
+
- example/android/android_web/android_web_gmail_login/features/support/hooks.rb
|
122
|
+
- example/desktop web/desktop_web_gmail_login.zip
|
123
|
+
- example/desktop web/desktop_web_gmail_login/features/gmail_login.feature
|
124
|
+
- example/desktop web/desktop_web_gmail_login/features/gmail_multi_login.feature
|
125
|
+
- example/desktop web/desktop_web_gmail_login/features/my_first.feature
|
126
|
+
- example/desktop web/desktop_web_gmail_login/features/screenshots/test.png
|
127
|
+
- example/desktop web/desktop_web_gmail_login/features/step_definitions/custom_steps.rb
|
128
|
+
- example/desktop web/desktop_web_gmail_login/features/support/env.rb
|
129
|
+
- example/desktop web/desktop_web_gmail_login/features/support/hooks.rb
|
130
|
+
- features-skeleton/my_first.feature
|
131
|
+
- features-skeleton/screenshots/test.png
|
132
|
+
- features-skeleton/step_definitions/custom_steps.rb
|
133
|
+
- features-skeleton/support/env.rb
|
134
|
+
- features-skeleton/support/hooks.rb
|
150
135
|
- lib/itms_automation.rb
|
151
|
-
- lib/itms_automation/
|
152
|
-
- lib/itms_automation/
|
153
|
-
- lib/itms_automation/
|
154
|
-
- lib/itms_automation/
|
136
|
+
- lib/itms_automation/assertion_steps.rb
|
137
|
+
- lib/itms_automation/click_elements_steps.rb
|
138
|
+
- lib/itms_automation/configuration_steps.rb
|
139
|
+
- lib/itms_automation/input_steps.rb
|
140
|
+
- lib/itms_automation/javascript_handling_steps.rb
|
141
|
+
- lib/itms_automation/methods/assertion_methods.rb
|
142
|
+
- lib/itms_automation/methods/click_elements_methods.rb
|
143
|
+
- lib/itms_automation/methods/configuration_methods.rb
|
144
|
+
- lib/itms_automation/methods/error_handling_methods.rb
|
145
|
+
- lib/itms_automation/methods/input_methods.rb
|
146
|
+
- lib/itms_automation/methods/javascript_handling_methods.rb
|
147
|
+
- lib/itms_automation/methods/misc_methods.rb
|
148
|
+
- lib/itms_automation/methods/navigate_methods.rb
|
149
|
+
- lib/itms_automation/methods/progress_methods.rb
|
150
|
+
- lib/itms_automation/methods/required_files.rb
|
151
|
+
- lib/itms_automation/methods/screenshot_methods.rb
|
152
|
+
- lib/itms_automation/navigation_steps.rb
|
153
|
+
- lib/itms_automation/progress_steps.rb
|
154
|
+
- lib/itms_automation/screenshot_steps.rb
|
155
155
|
- lib/itms_automation/version.rb
|
156
|
-
|
157
|
-
- project/Gemfile
|
158
|
-
- project/Gemfile.lock
|
159
|
-
- project/README.md
|
160
|
-
- project/Rakefile
|
161
|
-
- project/config/chrome_headless_options.yaml
|
162
|
-
- project/config/chrome_options.yaml
|
163
|
-
- project/config/firefox_headless_options.yaml
|
164
|
-
- project/config/firefox_options.yaml
|
165
|
-
- project/config/ie_options.yaml
|
166
|
-
- project/config/remote_options.yaml
|
167
|
-
- project/config/safari_options.yaml
|
168
|
-
- project/cucumber.yml
|
169
|
-
- project/features/TestSuite/WebGUI.feature
|
170
|
-
- project/features/step_definitions/lib_steps/steps_definition.rb
|
171
|
-
- project/features/step_definitions/repositories/project_object.yml
|
172
|
-
- project/features/support/env.rb
|
173
|
-
- project/features/support/hooks.rb
|
174
|
-
homepage: http://rubygems.org/gems/itms_automation
|
156
|
+
homepage: http://infodation.nl/
|
175
157
|
licenses:
|
176
158
|
- MIT
|
177
159
|
metadata: {}
|
@@ -183,14 +165,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
183
165
|
requirements:
|
184
166
|
- - ">="
|
185
167
|
- !ruby/object:Gem::Version
|
186
|
-
version:
|
168
|
+
version: 1.9.3
|
187
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
170
|
requirements:
|
189
171
|
- - ">="
|
190
172
|
- !ruby/object:Gem::Version
|
191
173
|
version: '0'
|
192
174
|
requirements: []
|
193
|
-
rubygems_version: 3.
|
175
|
+
rubygems_version: 3.1.2
|
194
176
|
signing_key:
|
195
177
|
specification_version: 4
|
196
178
|
summary: SELENIUM WEBDRIVER WITH RUBY & CUCUMBER
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "itms_automation"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|
@@ -1,119 +0,0 @@
|
|
1
|
-
module DocumentationGenerator
|
2
|
-
|
3
|
-
module CommentExtractor
|
4
|
-
def parse_and_format_comment(comment)
|
5
|
-
comment.gsub!(/.*coding:.*UTF-8.*/, '')
|
6
|
-
comment.strip!
|
7
|
-
comment_lines = comment.split("\n").take_while { |line| line =~ /^\s*#/ }
|
8
|
-
comment_lines && comment_lines.join("\n").gsub(/^\s*# ?/, '')
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
class StepDefinition
|
13
|
-
|
14
|
-
extend CommentExtractor
|
15
|
-
|
16
|
-
def initialize(definition, comment = nil)
|
17
|
-
@definition = definition
|
18
|
-
@comment = comment
|
19
|
-
end
|
20
|
-
|
21
|
-
def self.try_and_parse(code)
|
22
|
-
definition = code[/^\s*((When|Then|Given|AfterStep).*)do/, 1]
|
23
|
-
return unless definition
|
24
|
-
comment = parse_and_format_comment(code)
|
25
|
-
return if comment =~ /\bnodoc\b/
|
26
|
-
new(definition.strip, comment)
|
27
|
-
end
|
28
|
-
|
29
|
-
def format
|
30
|
-
<<-TEXT
|
31
|
-
* **#{format_definition}**
|
32
|
-
|
33
|
-
#{@comment.gsub(/^/, ' ')}
|
34
|
-
TEXT
|
35
|
-
end
|
36
|
-
|
37
|
-
def format_definition
|
38
|
-
if @definition =~ /AfterStep/
|
39
|
-
@definition[/@\w*/]
|
40
|
-
else
|
41
|
-
capture_groups = %w[([^\"]*) ([^"]*) (.*) (.*?) [^"]+ ([^\"]+) ([^']*) ([^/]*) (.+) (.*[^:])]
|
42
|
-
capture_groups.map! &Regexp.method(:escape)
|
43
|
-
|
44
|
-
@definition.
|
45
|
-
gsub('/^', '').
|
46
|
-
gsub('$/', '').
|
47
|
-
gsub(' ?', ' ').
|
48
|
-
gsub('(?:|I )', 'I ').
|
49
|
-
gsub('?:', '').
|
50
|
-
gsub(Regexp.new(capture_groups.join '|'), '...').
|
51
|
-
gsub(/\\\//, '/')
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
class StepDefinitionFile
|
57
|
-
|
58
|
-
FILE_COMMENT_END = 'FILE_COMMENT_END'
|
59
|
-
|
60
|
-
include CommentExtractor
|
61
|
-
|
62
|
-
def initialize(filename)
|
63
|
-
@filename = filename
|
64
|
-
@code = File.read(filename)
|
65
|
-
@steps = []
|
66
|
-
extract_comment
|
67
|
-
add_steps
|
68
|
-
end
|
69
|
-
|
70
|
-
def extract_comment
|
71
|
-
if @code.include?(FILE_COMMENT_END)
|
72
|
-
file_comment = @code.split(FILE_COMMENT_END).first
|
73
|
-
@comment = parse_and_format_comment(file_comment)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
def add_steps
|
78
|
-
@code.split("\n\n").each do |block|
|
79
|
-
step = StepDefinition.try_and_parse(block)
|
80
|
-
if step
|
81
|
-
@steps << step
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
def format
|
87
|
-
<<-TEXT
|
88
|
-
### #{format_filename}
|
89
|
-
|
90
|
-
#{@comment}
|
91
|
-
|
92
|
-
#{format_steps}
|
93
|
-
TEXT
|
94
|
-
end
|
95
|
-
|
96
|
-
def format_filename
|
97
|
-
@filename.split('/').last
|
98
|
-
end
|
99
|
-
|
100
|
-
def format_steps
|
101
|
-
@steps.collect { |step| step.format }.join("\n\n")
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
class StepDefinitionsDirectory
|
106
|
-
def initialize(directory)
|
107
|
-
@step_definition_files = []
|
108
|
-
Dir["#{directory}/*.rb"].to_a.sort.each do |filename|
|
109
|
-
next if filename =~ /all_steps/
|
110
|
-
@step_definition_files << StepDefinitionFile.new(filename)
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
def format
|
115
|
-
@step_definition_files.collect { |step_definition_file| step_definition_file.format }.join("\n\n")
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
end
|