acceptance_test 1.4.8 → 1.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.idea/acceptance_test.iml +84 -54
- data/CHANGES +4 -0
- data/features/wikipedia/step_definitions/steps.rb +2 -2
- data/lib/acceptance_test/acceptance_test.rb +19 -17
- data/lib/acceptance_test/version.rb +1 -1
- data/spec/features/steps/wikipedia_steps.rb +11 -20
- data/spec/turnip_helper.rb +1 -0
- data/spec/wikipedia_search_spec.rb +3 -7
- data/spec/wikipedia_search_with_config_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjdlNmU2N2Y0NWE2NWQ0YWYwMTkyYzQ3ZTZlMTk3MmY0ZTE0MTZmNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWMzNjM4MmEyNzNkOTlkZmQwOGExYjZiYTQwZGJiMTI5NTdiNWNkYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjVmNjEyYmU1ZjA0NTA2Mjc5OGEwNTdhYTVlMjBiNDljNzlkNDQwNzI1MDUx
|
10
|
+
NGJkYTY3NWJhNWIwNTFjNjg1Y2U0MmI3OWFhMDVhZjUzZTEyNGRmMGIwNjVm
|
11
|
+
ZmUwMjczYjAwOGFjOGYxNzM4N2U4NTdjODVhNjhjZWIzZTQ4OWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWJjZTM0ZmRmOTc2ODc0NjBjNzNhMzI2YTE0NjM2ODk0YmE4M2ZlNWRiYWM1
|
14
|
+
YmEyNzBiN2M2MjJiZTJkNDNjNmZkODcxNjRhNjMyNzFlZDRhMzhlZmQ3ZGRi
|
15
|
+
NmMwNDlhZmVhZGQ4NDlkYTVjMWQ2OWUzMDAxMjJjYjk4OTU2MTE=
|
data/.idea/acceptance_test.iml
CHANGED
@@ -123,29 +123,7 @@
|
|
123
123
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
124
124
|
<method />
|
125
125
|
</configuration>
|
126
|
-
<configuration default="false" name="
|
127
|
-
<module name="acceptance_test" />
|
128
|
-
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
129
|
-
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/spec" />
|
130
|
-
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
131
|
-
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
132
|
-
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
133
|
-
<envs />
|
134
|
-
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
135
|
-
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
136
|
-
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
137
|
-
<COVERAGE_PATTERN ENABLED="true">
|
138
|
-
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
139
|
-
</COVERAGE_PATTERN>
|
140
|
-
</EXTENSION>
|
141
|
-
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
142
|
-
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/wikipedia_search_with_steps.rb" />
|
143
|
-
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
144
|
-
<RunnerSettings RunnerId="RubyRunner" />
|
145
|
-
<ConfigurationWrapper RunnerId="RubyRunner" />
|
146
|
-
<method />
|
147
|
-
</configuration>
|
148
|
-
<configuration default="false" name="wikipedia_search: acceptance_test (1)" type="CucumberRunConfigurationType" factoryName="Cucumber" temporary="true">
|
126
|
+
<configuration default="false" name="wikipedia_search_from_csv: acceptance_test (1)" type="CucumberRunConfigurationType" factoryName="Cucumber" temporary="true">
|
149
127
|
<predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
|
150
128
|
<module name="acceptance_test" />
|
151
129
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -167,7 +145,7 @@
|
|
167
145
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
|
168
146
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
169
147
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
170
|
-
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/features/wikipedia/
|
148
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/features/wikipedia/wikipedia_search_from_csv.feature" />
|
171
149
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
|
172
150
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
|
173
151
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
|
@@ -184,7 +162,81 @@
|
|
184
162
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
185
163
|
<method />
|
186
164
|
</configuration>
|
187
|
-
<configuration default="false" name="
|
165
|
+
<configuration default="false" name="Run spec 'wikipedia_search_spec': acceptance_test" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
166
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
167
|
+
<module name="acceptance_test" />
|
168
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
169
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
170
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
171
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
172
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
173
|
+
<envs>
|
174
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
175
|
+
</envs>
|
176
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
177
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
178
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
179
|
+
<COVERAGE_PATTERN ENABLED="true">
|
180
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
181
|
+
</COVERAGE_PATTERN>
|
182
|
+
</EXTENSION>
|
183
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
184
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
185
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/wikipedia_search_spec.rb" />
|
186
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
187
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
188
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
189
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
190
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
191
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
192
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
193
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
194
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
195
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
196
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
197
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
198
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
199
|
+
<method />
|
200
|
+
</configuration>
|
201
|
+
<configuration default="false" name="Run spec 'wikipedia_search_with_config_spec': acceptance_test" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
202
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
203
|
+
<module name="acceptance_test" />
|
204
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
205
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
206
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
207
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
208
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
209
|
+
<envs>
|
210
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
211
|
+
</envs>
|
212
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
213
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
214
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
215
|
+
<COVERAGE_PATTERN ENABLED="true">
|
216
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
217
|
+
</COVERAGE_PATTERN>
|
218
|
+
</EXTENSION>
|
219
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
220
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
221
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/wikipedia_search_with_config_spec.rb" />
|
222
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
223
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
224
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
225
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
226
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
227
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
228
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
229
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
230
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
231
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
232
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
233
|
+
<RunnerSettings RunnerId="RubyDebugRunner" />
|
234
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
235
|
+
<ConfigurationWrapper RunnerId="RubyDebugRunner" />
|
236
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
237
|
+
<method />
|
238
|
+
</configuration>
|
239
|
+
<configuration default="false" name="Searching with selenium for a term with submit: acceptance_test" type="CucumberRunConfigurationType" factoryName="Cucumber" temporary="true">
|
188
240
|
<predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
|
189
241
|
<module name="acceptance_test" />
|
190
242
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -206,9 +258,9 @@
|
|
206
258
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
|
207
259
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
208
260
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
209
|
-
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/features/wikipedia/
|
261
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/features/wikipedia/wikipedia_search.feature" />
|
210
262
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
|
211
|
-
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
|
263
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="^Searching with selenium for a term with submit$" />
|
212
264
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
|
213
265
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
214
266
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
@@ -219,11 +271,13 @@
|
|
219
271
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
|
220
272
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
|
221
273
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
|
274
|
+
<RunnerSettings RunnerId="RubyDebugRunner" />
|
222
275
|
<RunnerSettings RunnerId="RubyRunner" />
|
276
|
+
<ConfigurationWrapper RunnerId="RubyDebugRunner" />
|
223
277
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
224
278
|
<method />
|
225
279
|
</configuration>
|
226
|
-
<configuration default="false" name="
|
280
|
+
<configuration default="false" name="wikipedia_search: acceptance_test (1)" type="CucumberRunConfigurationType" factoryName="Cucumber" temporary="true">
|
227
281
|
<predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
|
228
282
|
<module name="acceptance_test" />
|
229
283
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -245,9 +299,9 @@
|
|
245
299
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
|
246
300
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
247
301
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
248
|
-
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/features/wikipedia/
|
302
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/features/wikipedia/wikipedia_search.feature" />
|
249
303
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
|
250
|
-
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="
|
304
|
+
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
|
251
305
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
|
252
306
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
253
307
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
@@ -258,30 +312,6 @@
|
|
258
312
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
|
259
313
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
|
260
314
|
<CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
|
261
|
-
<RunnerSettings RunnerId="RubyDebugRunner" />
|
262
|
-
<RunnerSettings RunnerId="RubyRunner" />
|
263
|
-
<ConfigurationWrapper RunnerId="RubyDebugRunner" />
|
264
|
-
<ConfigurationWrapper RunnerId="RubyRunner" />
|
265
|
-
<method />
|
266
|
-
</configuration>
|
267
|
-
<configuration default="false" name="steps" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
268
|
-
<module name="acceptance_test" />
|
269
|
-
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
270
|
-
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/features/wikipedia/step_definitions" />
|
271
|
-
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
272
|
-
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
273
|
-
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
274
|
-
<envs />
|
275
|
-
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
276
|
-
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
277
|
-
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
278
|
-
<COVERAGE_PATTERN ENABLED="true">
|
279
|
-
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
280
|
-
</COVERAGE_PATTERN>
|
281
|
-
</EXTENSION>
|
282
|
-
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
283
|
-
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/features/wikipedia/step_definitions/steps.rb" />
|
284
|
-
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
285
315
|
<RunnerSettings RunnerId="RubyRunner" />
|
286
316
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
287
317
|
<method />
|
data/CHANGES
CHANGED
@@ -8,13 +8,13 @@ require 'acceptance_test/gherkin_helper'
|
|
8
8
|
data_reader = lambda {|source_path| CSV.read(File.expand_path(source_path)) }
|
9
9
|
GherkinHelper.instance.enable_external_source data_reader
|
10
10
|
|
11
|
-
acceptance_test =
|
11
|
+
acceptance_test = AcceptanceTest.new
|
12
12
|
|
13
13
|
Before do |scenario|
|
14
14
|
config_name = File.expand_path("spec/acceptance_config.yml")
|
15
15
|
config = HashWithIndifferentAccess.new(YAML.load_file(config_name))
|
16
16
|
|
17
|
-
acceptance_test
|
17
|
+
acceptance_test.configure config, false
|
18
18
|
|
19
19
|
acceptance_test.before acceptance_test.metadata_from_scenario(scenario)
|
20
20
|
end
|
@@ -8,7 +8,7 @@ require 'active_support/core_ext/hash'
|
|
8
8
|
class AcceptanceTest
|
9
9
|
attr_reader :config
|
10
10
|
|
11
|
-
def
|
11
|
+
def configure config={}, rspec=true
|
12
12
|
if config
|
13
13
|
@config = config.kind_of?(HashWithIndifferentAccess) ? config : HashWithIndifferentAccess.new(config)
|
14
14
|
else
|
@@ -43,6 +43,8 @@ class AcceptanceTest
|
|
43
43
|
rescue
|
44
44
|
;
|
45
45
|
end
|
46
|
+
|
47
|
+
configure_rspec if rspec
|
46
48
|
end
|
47
49
|
|
48
50
|
def before metadata={}
|
@@ -58,7 +60,7 @@ class AcceptanceTest
|
|
58
60
|
end
|
59
61
|
|
60
62
|
def after metadata={}, exception=nil, page=nil
|
61
|
-
|
63
|
+
driver = driver(metadata)
|
62
64
|
|
63
65
|
if driver and exception and page and not [:webkit].include? driver
|
64
66
|
screenshot_dir = File.expand_path(config[:screenshot_dir])
|
@@ -82,21 +84,7 @@ class AcceptanceTest
|
|
82
84
|
acceptance_test = self
|
83
85
|
|
84
86
|
acceptance_test_lambda = lambda do
|
85
|
-
|
86
|
-
|
87
|
-
before :all do
|
88
|
-
@acceptance_test = acceptance_test
|
89
|
-
end
|
90
|
-
|
91
|
-
around do |example|
|
92
|
-
acceptance_test.before example.metadata
|
93
|
-
|
94
|
-
example.run
|
95
|
-
|
96
|
-
acceptance_test.after example.metadata, example.exception, page
|
97
|
-
|
98
|
-
self.reset_session!
|
99
|
-
end
|
87
|
+
acceptance_test.configure_rspec self
|
100
88
|
end
|
101
89
|
|
102
90
|
RSpec.shared_context name do
|
@@ -140,6 +128,20 @@ class AcceptanceTest
|
|
140
128
|
[:webkit, :selenium, :poltergeist, :selenium_remote]
|
141
129
|
end
|
142
130
|
|
131
|
+
def configure_rspec rspec_conf=nil
|
132
|
+
acceptance_test = self
|
133
|
+
|
134
|
+
rspec_conf = RSpec.configuration unless rspec_conf
|
135
|
+
|
136
|
+
rspec_conf.around(:each) do |example|
|
137
|
+
acceptance_test.before(example.metadata)
|
138
|
+
|
139
|
+
example.run
|
140
|
+
|
141
|
+
acceptance_test.after(example.metadata)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
143
145
|
private
|
144
146
|
|
145
147
|
def timeout_in_seconds
|
@@ -1,34 +1,25 @@
|
|
1
|
-
require 'acceptance_test'
|
2
|
-
|
3
1
|
require 'csv'
|
4
2
|
require 'yaml'
|
5
3
|
|
4
|
+
require 'acceptance_test'
|
6
5
|
require 'acceptance_test/gherkin_helper'
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
GherkinHelper.instance.enable_external_source data_reader
|
11
|
-
|
12
|
-
config_name = File.expand_path("spec/acceptance_config.yml")
|
13
|
-
acceptance_config = HashWithIndifferentAccess.new(YAML.load_file(config_name))
|
7
|
+
def setup_env
|
8
|
+
data_reader = lambda {|source_path| CSV.read(File.expand_path(source_path)) }
|
9
|
+
GherkinHelper.instance.enable_external_source data_reader
|
14
10
|
|
15
|
-
|
11
|
+
config_name = File.expand_path("spec/acceptance_config.yml")
|
12
|
+
config = HashWithIndifferentAccess.new(YAML.load_file(config_name))
|
16
13
|
|
17
|
-
|
18
|
-
|
19
|
-
acceptance_test.before({})
|
20
|
-
|
21
|
-
example.run
|
22
|
-
|
23
|
-
acceptance_test.after({})
|
24
|
-
|
25
|
-
reset_session!
|
26
|
-
end
|
14
|
+
acceptance_test = AcceptanceTest.new
|
15
|
+
acceptance_test.configure config
|
27
16
|
end
|
28
17
|
|
18
|
+
setup_env
|
19
|
+
|
29
20
|
module WikipediaSteps
|
30
21
|
step "I am within wikipedia.com" do
|
31
|
-
#
|
22
|
+
# Capybara.app_host = "http://wikipedia.com"
|
32
23
|
# Capybara.default_driver = :selenium
|
33
24
|
end
|
34
25
|
|
data/spec/turnip_helper.rb
CHANGED
@@ -1,17 +1,13 @@
|
|
1
1
|
require 'acceptance_test'
|
2
2
|
|
3
|
-
acceptance_test = AcceptanceTest.new
|
3
|
+
acceptance_test = AcceptanceTest.new
|
4
|
+
acceptance_test.configure({webapp_url: "http://www.wikipedia.org", timeout_in_seconds: 10})
|
4
5
|
|
5
6
|
RSpec.describe 'Wikipedia Search' do
|
6
7
|
|
7
|
-
before do
|
8
|
+
before do
|
8
9
|
puts "Using driver: #{Capybara.current_driver}."
|
9
10
|
puts "Default wait time: #{Capybara.default_wait_time}."
|
10
|
-
acceptance_test.before example.metadata
|
11
|
-
end
|
12
|
-
|
13
|
-
after do |example|
|
14
|
-
acceptance_test.after example.metadata
|
15
11
|
end
|
16
12
|
|
17
13
|
it "uses selenium driver", driver: :selenium, exclude: false do
|
@@ -4,7 +4,8 @@ require 'yaml'
|
|
4
4
|
config_name = File.expand_path("spec/acceptance_config.yml")
|
5
5
|
config = config_name ? HashWithIndifferentAccess.new(YAML.load_file(config_name)) : {}
|
6
6
|
|
7
|
-
acceptance_test = AcceptanceTest.new
|
7
|
+
acceptance_test = AcceptanceTest.new
|
8
|
+
acceptance_test.configure config, false
|
8
9
|
|
9
10
|
acceptance_test.create_shared_context "WikipediaAcceptanceTest"
|
10
11
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acceptance_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Shvets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gemspec_deps_gen
|