acceptance_test 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGES +4 -0
- data/lib/acceptance_test/{turnip_helper.rb → acceptance_test_helper.rb} +13 -17
- data/lib/acceptance_test/version.rb +1 -1
- data/spec/turnip_helper.rb +13 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzMxMGI3ODQ4MWU1NTY2NjRmMjY4ZGEzYzdhZDRhNjZhZmE1NTdiNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTRiYTBhNTY5MTU5ZmM2MjBkMWUyNGRkMjA0M2ZlNjBlZjI0ZDIyZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzIyODY3YTdmMmE0NjkyMDE2NmM4OWE5ZjI0YWZlN2U1ZDBhYTE0MTAwYzk3
|
10
|
+
OWFkMzIwNjlhMTA4ODZkZThhY2I1ZmNiZjFkOTdhZGViMzdlZGIwMjM2OTA1
|
11
|
+
NjcxNjgxNmM5YWQ4NTMzZTU2YWU5NTM3ZjRjZjdlNDA4YWFkMzg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmE3ZDc0YjRjNjFhNDU4ZGI3OTA3MjMwNTQ3MzA2NTViYjhkN2FlY2Q4OWU1
|
14
|
+
Y2QyNTcyZDFiZTA4NDA4MDM4YmQ3ZDA4NzJmMmIzMDcxZDZjYzE2ODk2MWQ1
|
15
|
+
M2ZhMDE1ODk3ZGZhMTFkYTM2MWZiMGU2MTllYzA0NTk1MzU1ZDY=
|
data/CHANGES
CHANGED
@@ -1,25 +1,28 @@
|
|
1
|
+
require 'singleton'
|
1
2
|
require 'turnip/capybara'
|
2
3
|
require 'turnip/rspec'
|
3
|
-
require 'csv'
|
4
|
-
require 'yaml'
|
5
|
-
require 'acceptance_test'
|
6
4
|
|
5
|
+
require 'acceptance_test'
|
7
6
|
require 'acceptance_test/gherkin_helper'
|
8
7
|
|
9
|
-
class
|
10
|
-
|
8
|
+
class AcceptanceTestHelper
|
9
|
+
include Singleton
|
11
10
|
|
12
11
|
def initialize
|
13
|
-
@acceptance_test = AcceptanceTest.instance
|
14
|
-
|
15
12
|
RSpec.configure do |config|
|
16
13
|
config.include Capybara::DSL
|
17
14
|
end
|
15
|
+
end
|
18
16
|
|
19
|
-
|
17
|
+
def configure config
|
18
|
+
AcceptanceTest.instance.configure config
|
20
19
|
end
|
21
20
|
|
22
|
-
def
|
21
|
+
def enable_external_source data_reader
|
22
|
+
GherkinHelper.instance.enable_external_source data_reader
|
23
|
+
end
|
24
|
+
|
25
|
+
def register_turnip_steps path, class_name, tag, shared_group
|
23
26
|
require path
|
24
27
|
|
25
28
|
clazz = Object.const_get(class_name)
|
@@ -28,14 +31,7 @@ class TurnipHelper
|
|
28
31
|
config.include clazz, tag => true
|
29
32
|
end
|
30
33
|
|
31
|
-
|
34
|
+
AcceptanceTest.instance.create_shared_context shared_group
|
32
35
|
end
|
33
36
|
|
34
|
-
private
|
35
|
-
|
36
|
-
def enable_external_source # enable external source for gherkin
|
37
|
-
data_reader = lambda {|source_path| CSV.read(File.expand_path(source_path)) }
|
38
|
-
|
39
|
-
GherkinHelper.instance.enable_external_source data_reader
|
40
|
-
end
|
41
37
|
end
|
data/spec/turnip_helper.rb
CHANGED
@@ -1,12 +1,19 @@
|
|
1
|
-
require '
|
1
|
+
require 'yaml'
|
2
|
+
require 'csv'
|
3
|
+
require 'active_support/core_ext/hash'
|
2
4
|
|
3
|
-
|
5
|
+
require 'acceptance_test/acceptance_test_helper'
|
4
6
|
|
5
|
-
|
6
|
-
|
7
|
+
helper = AcceptanceTestHelper.instance
|
8
|
+
|
9
|
+
data_reader = lambda {|source_path| CSV.read(File.expand_path(source_path)) }
|
10
|
+
helper.enable_external_source data_reader # enable external source for gherkin
|
7
11
|
|
8
|
-
helper.
|
12
|
+
helper.register_turnip_steps 'features/steps/wikipedia_steps',
|
13
|
+
'WikipediaSteps', :wikipedia, "WikipediaAcceptanceTest"
|
9
14
|
|
10
|
-
|
15
|
+
config_name = File.expand_path("spec/acceptance_config.yml")
|
16
|
+
config = HashWithIndifferentAccess.new(YAML.load_file(config_name))
|
11
17
|
|
18
|
+
helper.configure config
|
12
19
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acceptance_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Shvets
|
@@ -71,11 +71,11 @@ files:
|
|
71
71
|
- features/wikipedia/wikipedia_search_from_csv.feature
|
72
72
|
- lib/acceptance_test.rb
|
73
73
|
- lib/acceptance_test/acceptance_test.rb
|
74
|
+
- lib/acceptance_test/acceptance_test_helper.rb
|
74
75
|
- lib/acceptance_test/gherkin_helper.rb
|
75
76
|
- lib/acceptance_test/page.rb
|
76
77
|
- lib/acceptance_test/page_set.rb
|
77
78
|
- lib/acceptance_test/screenshot_maker.rb
|
78
|
-
- lib/acceptance_test/turnip_helper.rb
|
79
79
|
- lib/acceptance_test/version.rb
|
80
80
|
- spec/acceptance_config.yml
|
81
81
|
- spec/features/data.csv
|