cucumber_factory 1.11.6 → 1.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +1 -0
- data/gemfiles/Gemfile.cucumber-1.3.lock +1 -1
- data/gemfiles/Gemfile.cucumber-2.4.lock +1 -1
- data/gemfiles/Gemfile.cucumber-3.0 +1 -1
- data/gemfiles/Gemfile.cucumber-3.0.lock +10 -5
- data/lib/cucumber/factory.rb +1 -1
- data/lib/cucumber_factory/version.rb +1 -1
- data/spec/cucumber_factory/steps_spec.rb +12 -0
- metadata +3 -3
- data/Gemfile +0 -16
- data/Gemfile.lock +0 -84
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d28de517891242c79d8f64c23f92e6a6bc322f12
|
4
|
+
data.tar.gz: 532c04a63d0c234063abf1611bc119eaef88c0eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1b9b07fe1e6db10e9ac006e1806ef4d132b35ccf8400094b29d20ced5db682aa5088ec43d55ed8554cc7f9191313ab662de5010cdde66d8ba95f96b09f53eed
|
7
|
+
data.tar.gz: 7774e3ae88b88d31f051a34d9ba9f342fce6284a6828dcc38aeacae52c769c83a7830809e8a1f966521a765a0d24f36e6cc62b4ec0d742dcad721fc513e3b7de
|
data/Gemfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
./gemfiles/Gemfile.cucumber-2.4
|
data/Gemfile.lock
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
./gemfiles/Gemfile.cucumber-2.4.lock
|
@@ -1,3 +1,12 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
cucumber_factory (1.11.7)
|
5
|
+
activerecord
|
6
|
+
activesupport
|
7
|
+
cucumber
|
8
|
+
cucumber_priority (>= 0.2.0)
|
9
|
+
|
1
10
|
GEM
|
2
11
|
remote: https://rubygems.org/
|
3
12
|
specs:
|
@@ -28,10 +37,6 @@ GEM
|
|
28
37
|
backports (~> 3.6)
|
29
38
|
gherkin (~> 4.0)
|
30
39
|
cucumber-wire (0.0.1)
|
31
|
-
cucumber_factory (1.11.6)
|
32
|
-
activesupport
|
33
|
-
cucumber
|
34
|
-
cucumber_priority
|
35
40
|
cucumber_priority (0.2.0)
|
36
41
|
cucumber
|
37
42
|
database_cleaner (1.5.3)
|
@@ -68,7 +73,7 @@ DEPENDENCIES
|
|
68
73
|
activerecord (~> 5.0.0)
|
69
74
|
activesupport (~> 5.0.0)
|
70
75
|
cucumber (~> 3.0.0.pre.1)
|
71
|
-
cucumber_factory
|
76
|
+
cucumber_factory!
|
72
77
|
database_cleaner
|
73
78
|
gemika
|
74
79
|
mysql2
|
data/lib/cucumber/factory.rb
CHANGED
@@ -99,7 +99,7 @@ module Cucumber
|
|
99
99
|
if value_type == "above"
|
100
100
|
value = CucumberFactory::Switcher.find_last(association.klass) or raise "There is no last #{attribute}"
|
101
101
|
else
|
102
|
-
value = get_named_record(world, value)
|
102
|
+
value = get_named_record(world, value) || world.Transform(value)
|
103
103
|
end
|
104
104
|
else
|
105
105
|
value = world.Transform(value)
|
@@ -159,6 +159,18 @@ describe 'steps provided by cucumber_factory' do
|
|
159
159
|
before_sunset.reviewer.name.should == "John"
|
160
160
|
end
|
161
161
|
|
162
|
+
it "should fallback to using transforms when no named record is found" do
|
163
|
+
user = User.create!(:name => 'Me')
|
164
|
+
@main.instance_eval do
|
165
|
+
Transform(/^(me)$/) do |value|
|
166
|
+
user
|
167
|
+
end
|
168
|
+
end
|
169
|
+
invoke_cucumber_step('there is a movie with the title "Before Sunset" and the reviewer "me"')
|
170
|
+
before_sunset = Movie.find_by_title!("Before Sunset")
|
171
|
+
before_sunset.reviewer.should == user
|
172
|
+
end
|
173
|
+
|
162
174
|
it "should give created_at precedence over id when saying 'above' so that records with UUIDs are handled correctly" do
|
163
175
|
invoke_cucumber_step('there is a user with the name "Jane"')
|
164
176
|
invoke_cucumber_step('there is a user with the name "John"')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber_factory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
133
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.
|
134
|
+
rubygems_version: 2.6.12
|
135
135
|
signing_key:
|
136
136
|
specification_version: 4
|
137
137
|
summary: Create records from Cucumber features without writing step definitions.
|
data/Gemfile
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Runtime dependencies
|
4
|
-
gem 'cucumber', '~> 2.4.0'
|
5
|
-
gem 'activesupport', '~> 4.2.0'
|
6
|
-
gem 'activerecord', '~> 4.2.0'
|
7
|
-
gem 'mysql2'
|
8
|
-
|
9
|
-
# Development dependencies
|
10
|
-
gem 'rspec', '~> 3.0'
|
11
|
-
gem 'rake'
|
12
|
-
gem 'database_cleaner'
|
13
|
-
gem 'gemika'
|
14
|
-
|
15
|
-
# Gem under test
|
16
|
-
gem 'cucumber_factory', :path => '..'
|
data/Gemfile.lock
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ..
|
3
|
-
specs:
|
4
|
-
cucumber_factory (1.11.6)
|
5
|
-
activerecord
|
6
|
-
activesupport
|
7
|
-
cucumber
|
8
|
-
cucumber_priority (>= 0.2.0)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
activemodel (4.2.7.1)
|
14
|
-
activesupport (= 4.2.7.1)
|
15
|
-
builder (~> 3.1)
|
16
|
-
activerecord (4.2.7.1)
|
17
|
-
activemodel (= 4.2.7.1)
|
18
|
-
activesupport (= 4.2.7.1)
|
19
|
-
arel (~> 6.0)
|
20
|
-
activesupport (4.2.7.1)
|
21
|
-
i18n (~> 0.7)
|
22
|
-
json (~> 1.7, >= 1.7.7)
|
23
|
-
minitest (~> 5.1)
|
24
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
25
|
-
tzinfo (~> 1.1)
|
26
|
-
arel (6.0.4)
|
27
|
-
builder (3.2.2)
|
28
|
-
cucumber (2.4.0)
|
29
|
-
builder (>= 2.1.2)
|
30
|
-
cucumber-core (~> 1.5.0)
|
31
|
-
cucumber-wire (~> 0.0.1)
|
32
|
-
diff-lcs (>= 1.1.3)
|
33
|
-
gherkin (~> 4.0)
|
34
|
-
multi_json (>= 1.7.5, < 2.0)
|
35
|
-
multi_test (>= 0.1.2)
|
36
|
-
cucumber-core (1.5.0)
|
37
|
-
gherkin (~> 4.0)
|
38
|
-
cucumber-wire (0.0.1)
|
39
|
-
cucumber_priority (0.2.0)
|
40
|
-
cucumber
|
41
|
-
database_cleaner (1.5.3)
|
42
|
-
diff-lcs (1.2.5)
|
43
|
-
gemika (0.3.2)
|
44
|
-
gherkin (4.0.0)
|
45
|
-
i18n (0.7.0)
|
46
|
-
json (1.8.3)
|
47
|
-
minitest (5.10.1)
|
48
|
-
multi_json (1.12.1)
|
49
|
-
multi_test (0.1.2)
|
50
|
-
mysql2 (0.4.5)
|
51
|
-
rake (12.0.0)
|
52
|
-
rspec (3.5.0)
|
53
|
-
rspec-core (~> 3.5.0)
|
54
|
-
rspec-expectations (~> 3.5.0)
|
55
|
-
rspec-mocks (~> 3.5.0)
|
56
|
-
rspec-core (3.5.4)
|
57
|
-
rspec-support (~> 3.5.0)
|
58
|
-
rspec-expectations (3.5.0)
|
59
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
60
|
-
rspec-support (~> 3.5.0)
|
61
|
-
rspec-mocks (3.5.0)
|
62
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
63
|
-
rspec-support (~> 3.5.0)
|
64
|
-
rspec-support (3.5.0)
|
65
|
-
thread_safe (0.3.5)
|
66
|
-
tzinfo (1.2.2)
|
67
|
-
thread_safe (~> 0.1)
|
68
|
-
|
69
|
-
PLATFORMS
|
70
|
-
ruby
|
71
|
-
|
72
|
-
DEPENDENCIES
|
73
|
-
activerecord (~> 4.2.0)
|
74
|
-
activesupport (~> 4.2.0)
|
75
|
-
cucumber (~> 2.4.0)
|
76
|
-
cucumber_factory!
|
77
|
-
database_cleaner
|
78
|
-
gemika
|
79
|
-
mysql2
|
80
|
-
rake
|
81
|
-
rspec (~> 3.0)
|
82
|
-
|
83
|
-
BUNDLED WITH
|
84
|
-
1.13.7
|