cucumber_factory 1.10.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -1
- data/README.rdoc +6 -7
- data/lib/cucumber/factory/build_strategy.rb +23 -11
- data/lib/cucumber_factory/version.rb +1 -1
- data/spec/app_root/log/.keep +0 -0
- data/spec/rails-2.3/Gemfile +1 -0
- data/spec/rails-2.3/Gemfile.lock +63 -0
- data/spec/rails-3.0/Gemfile +1 -0
- data/spec/rails-3.0/Gemfile.lock +116 -0
- data/spec/rails-3.2/Gemfile +1 -0
- data/spec/rails-3.2/Gemfile.lock +124 -0
- data/spec/rails-4.0/Gemfile +2 -1
- data/spec/rails-4.0/Gemfile.lock +119 -0
- data/spec/shared/cucumber_factory/steps_spec.rb +6 -0
- metadata +7 -3
data/.gitignore
CHANGED
data/README.rdoc
CHANGED
@@ -53,10 +53,14 @@ Note that in the example above, "Before Sunrise" is only a name you can use to r
|
|
53
53
|
|
54
54
|
{Machinist blueprints}[http://github.com/notahat/machinist] and {factory_girl factories}[http://github.com/thoughtbot/factory_girl] will be used when available.
|
55
55
|
|
56
|
-
You can use
|
56
|
+
You can use a {FactoryGirl child factory}[https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#inheritance] or {Machinist named blueprint}[https://github.com/notahat/machinist/tree/1.0-maintenance#named-blueprints] by putting the variant name in parentheses:
|
57
57
|
|
58
58
|
Given there is a movie (comedy) with the title "Groundhog Day"
|
59
59
|
|
60
|
+
You can use {FactoryGirl traits}[https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#traits] by putting the traits in parentheses, as a comma-separated list:
|
61
|
+
|
62
|
+
Given there is a movie (moody, dark) with the title "Interstellar"
|
63
|
+
|
60
64
|
|
61
65
|
== Overriding factory steps
|
62
66
|
|
@@ -81,7 +85,7 @@ In Rails 2, add the following to your <tt>environment.rb</tt>:
|
|
81
85
|
|
82
86
|
config.gem 'cucumber_factory'
|
83
87
|
|
84
|
-
In Rails 3
|
88
|
+
In Rails 3+, add the following to your <tt>Gemfile</tt>:
|
85
89
|
|
86
90
|
gem 'cucumber_factory'
|
87
91
|
|
@@ -90,11 +94,6 @@ Finally, create a file <tt>features/step_definitions/factory_steps.rb</tt>, whic
|
|
90
94
|
Cucumber::Factory.add_steps(self)
|
91
95
|
|
92
96
|
|
93
|
-
== Rails 3 compatibility
|
94
|
-
|
95
|
-
We cannot guarantee Rails 3 compatibility at this point, but we will upgrade the gem when Rails 3 is released.
|
96
|
-
|
97
|
-
|
98
97
|
=== Credits
|
99
98
|
|
100
99
|
Henning Koch
|
@@ -10,13 +10,18 @@ module Cucumber
|
|
10
10
|
def from_prose(model_prose, variant_prose)
|
11
11
|
# don't use \w which depends on the system locale
|
12
12
|
underscored_model_name = model_prose.gsub(/[^A-Za-z0-9_\/]+/, "_")
|
13
|
-
|
13
|
+
if variant_prose.present?
|
14
|
+
variants = /\((.*?)\)/.match(variant_prose)[1].split(/\s*,\s*/)
|
15
|
+
variants = variants.collect { |variant| variant.downcase.gsub(" ", "_") }
|
16
|
+
else
|
17
|
+
variants = []
|
18
|
+
end
|
14
19
|
|
15
|
-
if factory_girl_strategy = factory_girl_strategy(
|
20
|
+
if factory_girl_strategy = factory_girl_strategy(underscored_model_name, variants)
|
16
21
|
factory_girl_strategy
|
17
22
|
else
|
18
23
|
model_class = underscored_model_name.camelize.constantize
|
19
|
-
machinist_strategy(model_class,
|
24
|
+
machinist_strategy(model_class, variants) ||
|
20
25
|
active_record_strategy(model_class) ||
|
21
26
|
ruby_object_strategy(model_class)
|
22
27
|
end
|
@@ -24,25 +29,32 @@ module Cucumber
|
|
24
29
|
|
25
30
|
private
|
26
31
|
|
27
|
-
def factory_girl_strategy(factory_name)
|
32
|
+
def factory_girl_strategy(factory_name, variants)
|
28
33
|
return unless defined?(::FactoryGirl)
|
29
|
-
|
34
|
+
variants = variants.map(&:to_sym)
|
30
35
|
factory_name = factory_name.to_s.underscore.gsub('/', '_').to_sym
|
31
|
-
if factory = ::FactoryGirl.factories[factory_name]
|
32
36
|
|
37
|
+
factory = ::FactoryGirl.factories[factory_name]
|
38
|
+
|
39
|
+
if factory.nil? && variants.present? && factory = ::FactoryGirl.factories[variants[0]]
|
40
|
+
factory_name, *variants = variants
|
41
|
+
end
|
42
|
+
|
43
|
+
if factory
|
33
44
|
new(factory.build_class) do |attributes|
|
34
|
-
::FactoryGirl.create(
|
45
|
+
::FactoryGirl.create(factory_name, *variants, attributes)
|
35
46
|
end
|
36
|
-
|
37
47
|
end
|
48
|
+
|
38
49
|
end
|
39
50
|
|
40
|
-
def machinist_strategy(model_class,
|
51
|
+
def machinist_strategy(model_class, variants)
|
41
52
|
if model_class.respond_to?(:make)
|
42
53
|
|
43
54
|
new(model_class) do |attributes|
|
44
|
-
if
|
45
|
-
|
55
|
+
if variants.present?
|
56
|
+
variants.size == 1 or raise 'Machinist only supports a single variant per blueprint'
|
57
|
+
model_class.make(variants.first.to_sym, attributes)
|
46
58
|
else
|
47
59
|
model_class.make(attributes)
|
48
60
|
end
|
File without changes
|
data/spec/rails-2.3/Gemfile
CHANGED
@@ -0,0 +1,63 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
cucumber_factory (1.11.0)
|
5
|
+
activesupport
|
6
|
+
cucumber
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionmailer (2.3.18)
|
12
|
+
actionpack (= 2.3.18)
|
13
|
+
actionpack (2.3.18)
|
14
|
+
activesupport (= 2.3.18)
|
15
|
+
rack (~> 1.1.0)
|
16
|
+
activerecord (2.3.18)
|
17
|
+
activesupport (= 2.3.18)
|
18
|
+
activeresource (2.3.18)
|
19
|
+
activesupport (= 2.3.18)
|
20
|
+
activesupport (2.3.18)
|
21
|
+
builder (3.2.2)
|
22
|
+
cucumber (1.3.15)
|
23
|
+
builder (>= 2.1.2)
|
24
|
+
diff-lcs (>= 1.1.3)
|
25
|
+
gherkin (~> 2.12)
|
26
|
+
multi_json (>= 1.7.5, < 2.0)
|
27
|
+
multi_test (>= 0.1.1)
|
28
|
+
diff-lcs (1.2.5)
|
29
|
+
gherkin (2.12.2)
|
30
|
+
multi_json (~> 1.3)
|
31
|
+
hoe (2.8.0)
|
32
|
+
rake (>= 0.8.7)
|
33
|
+
multi_json (1.10.1)
|
34
|
+
multi_test (0.1.1)
|
35
|
+
rack (1.1.6)
|
36
|
+
rails (2.3.18)
|
37
|
+
actionmailer (= 2.3.18)
|
38
|
+
actionpack (= 2.3.18)
|
39
|
+
activerecord (= 2.3.18)
|
40
|
+
activeresource (= 2.3.18)
|
41
|
+
activesupport (= 2.3.18)
|
42
|
+
rake (>= 0.8.3)
|
43
|
+
rake (10.2.1)
|
44
|
+
rspec (1.3.2)
|
45
|
+
rspec-rails (1.3.4)
|
46
|
+
rack (>= 1.0.0)
|
47
|
+
rspec (~> 1.3.1)
|
48
|
+
sqlite3 (1.3.9)
|
49
|
+
test-unit (1.2.3)
|
50
|
+
hoe (>= 1.5.1)
|
51
|
+
|
52
|
+
PLATFORMS
|
53
|
+
ruby
|
54
|
+
|
55
|
+
DEPENDENCIES
|
56
|
+
cucumber (< 2)
|
57
|
+
cucumber_factory!
|
58
|
+
hoe (= 2.8.0)
|
59
|
+
rails (~> 2.3.10)
|
60
|
+
rspec (< 2)
|
61
|
+
rspec-rails (< 2)
|
62
|
+
sqlite3
|
63
|
+
test-unit (= 1.2.3)
|
data/spec/rails-3.0/Gemfile
CHANGED
@@ -0,0 +1,116 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
cucumber_factory (1.11.0)
|
5
|
+
activesupport
|
6
|
+
cucumber
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
abstract (1.0.0)
|
12
|
+
actionmailer (3.0.20)
|
13
|
+
actionpack (= 3.0.20)
|
14
|
+
mail (~> 2.2.19)
|
15
|
+
actionpack (3.0.20)
|
16
|
+
activemodel (= 3.0.20)
|
17
|
+
activesupport (= 3.0.20)
|
18
|
+
builder (~> 2.1.2)
|
19
|
+
erubis (~> 2.6.6)
|
20
|
+
i18n (~> 0.5.0)
|
21
|
+
rack (~> 1.2.5)
|
22
|
+
rack-mount (~> 0.6.14)
|
23
|
+
rack-test (~> 0.5.7)
|
24
|
+
tzinfo (~> 0.3.23)
|
25
|
+
activemodel (3.0.20)
|
26
|
+
activesupport (= 3.0.20)
|
27
|
+
builder (~> 2.1.2)
|
28
|
+
i18n (~> 0.5.0)
|
29
|
+
activerecord (3.0.20)
|
30
|
+
activemodel (= 3.0.20)
|
31
|
+
activesupport (= 3.0.20)
|
32
|
+
arel (~> 2.0.10)
|
33
|
+
tzinfo (~> 0.3.23)
|
34
|
+
activeresource (3.0.20)
|
35
|
+
activemodel (= 3.0.20)
|
36
|
+
activesupport (= 3.0.20)
|
37
|
+
activesupport (3.0.20)
|
38
|
+
arel (2.0.10)
|
39
|
+
builder (2.1.2)
|
40
|
+
cucumber (1.3.15)
|
41
|
+
builder (>= 2.1.2)
|
42
|
+
diff-lcs (>= 1.1.3)
|
43
|
+
gherkin (~> 2.12)
|
44
|
+
multi_json (>= 1.7.5, < 2.0)
|
45
|
+
multi_test (>= 0.1.1)
|
46
|
+
diff-lcs (1.2.5)
|
47
|
+
erubis (2.6.6)
|
48
|
+
abstract (>= 1.0.0)
|
49
|
+
gherkin (2.12.2)
|
50
|
+
multi_json (~> 1.3)
|
51
|
+
i18n (0.5.3)
|
52
|
+
json (1.8.1)
|
53
|
+
mail (2.2.20)
|
54
|
+
activesupport (>= 2.3.6)
|
55
|
+
i18n (>= 0.4.0)
|
56
|
+
mime-types (~> 1.16)
|
57
|
+
treetop (~> 1.4.8)
|
58
|
+
mime-types (1.25.1)
|
59
|
+
multi_json (1.10.1)
|
60
|
+
multi_test (0.1.1)
|
61
|
+
polyglot (0.3.4)
|
62
|
+
rack (1.2.8)
|
63
|
+
rack-mount (0.6.14)
|
64
|
+
rack (>= 1.0.0)
|
65
|
+
rack-test (0.5.7)
|
66
|
+
rack (>= 1.0)
|
67
|
+
rails (3.0.20)
|
68
|
+
actionmailer (= 3.0.20)
|
69
|
+
actionpack (= 3.0.20)
|
70
|
+
activerecord (= 3.0.20)
|
71
|
+
activeresource (= 3.0.20)
|
72
|
+
activesupport (= 3.0.20)
|
73
|
+
bundler (~> 1.0)
|
74
|
+
railties (= 3.0.20)
|
75
|
+
railties (3.0.20)
|
76
|
+
actionpack (= 3.0.20)
|
77
|
+
activesupport (= 3.0.20)
|
78
|
+
rake (>= 0.8.7)
|
79
|
+
rdoc (~> 3.4)
|
80
|
+
thor (~> 0.14.4)
|
81
|
+
rake (10.2.1)
|
82
|
+
rdoc (3.12.2)
|
83
|
+
json (~> 1.4)
|
84
|
+
rspec (2.14.1)
|
85
|
+
rspec-core (~> 2.14.0)
|
86
|
+
rspec-expectations (~> 2.14.0)
|
87
|
+
rspec-mocks (~> 2.14.0)
|
88
|
+
rspec-core (2.14.8)
|
89
|
+
rspec-expectations (2.14.5)
|
90
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
91
|
+
rspec-mocks (2.14.6)
|
92
|
+
rspec-rails (2.14.2)
|
93
|
+
actionpack (>= 3.0)
|
94
|
+
activemodel (>= 3.0)
|
95
|
+
activesupport (>= 3.0)
|
96
|
+
railties (>= 3.0)
|
97
|
+
rspec-core (~> 2.14.0)
|
98
|
+
rspec-expectations (~> 2.14.0)
|
99
|
+
rspec-mocks (~> 2.14.0)
|
100
|
+
sqlite3 (1.3.9)
|
101
|
+
thor (0.14.6)
|
102
|
+
treetop (1.4.15)
|
103
|
+
polyglot
|
104
|
+
polyglot (>= 0.3.1)
|
105
|
+
tzinfo (0.3.39)
|
106
|
+
|
107
|
+
PLATFORMS
|
108
|
+
ruby
|
109
|
+
|
110
|
+
DEPENDENCIES
|
111
|
+
cucumber (< 2)
|
112
|
+
cucumber_factory!
|
113
|
+
rails (~> 3.0.3)
|
114
|
+
rspec
|
115
|
+
rspec-rails
|
116
|
+
sqlite3
|
data/spec/rails-3.2/Gemfile
CHANGED
@@ -0,0 +1,124 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
cucumber_factory (1.11.0)
|
5
|
+
activesupport
|
6
|
+
cucumber
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionmailer (3.2.17)
|
12
|
+
actionpack (= 3.2.17)
|
13
|
+
mail (~> 2.5.4)
|
14
|
+
actionpack (3.2.17)
|
15
|
+
activemodel (= 3.2.17)
|
16
|
+
activesupport (= 3.2.17)
|
17
|
+
builder (~> 3.0.0)
|
18
|
+
erubis (~> 2.7.0)
|
19
|
+
journey (~> 1.0.4)
|
20
|
+
rack (~> 1.4.5)
|
21
|
+
rack-cache (~> 1.2)
|
22
|
+
rack-test (~> 0.6.1)
|
23
|
+
sprockets (~> 2.2.1)
|
24
|
+
activemodel (3.2.17)
|
25
|
+
activesupport (= 3.2.17)
|
26
|
+
builder (~> 3.0.0)
|
27
|
+
activerecord (3.2.17)
|
28
|
+
activemodel (= 3.2.17)
|
29
|
+
activesupport (= 3.2.17)
|
30
|
+
arel (~> 3.0.2)
|
31
|
+
tzinfo (~> 0.3.29)
|
32
|
+
activeresource (3.2.17)
|
33
|
+
activemodel (= 3.2.17)
|
34
|
+
activesupport (= 3.2.17)
|
35
|
+
activesupport (3.2.17)
|
36
|
+
i18n (~> 0.6, >= 0.6.4)
|
37
|
+
multi_json (~> 1.0)
|
38
|
+
arel (3.0.3)
|
39
|
+
builder (3.0.4)
|
40
|
+
cucumber (1.3.15)
|
41
|
+
builder (>= 2.1.2)
|
42
|
+
diff-lcs (>= 1.1.3)
|
43
|
+
gherkin (~> 2.12)
|
44
|
+
multi_json (>= 1.7.5, < 2.0)
|
45
|
+
multi_test (>= 0.1.1)
|
46
|
+
diff-lcs (1.2.5)
|
47
|
+
erubis (2.7.0)
|
48
|
+
gherkin (2.12.2)
|
49
|
+
multi_json (~> 1.3)
|
50
|
+
hike (1.2.3)
|
51
|
+
i18n (0.6.9)
|
52
|
+
journey (1.0.4)
|
53
|
+
json (1.8.1)
|
54
|
+
mail (2.5.4)
|
55
|
+
mime-types (~> 1.16)
|
56
|
+
treetop (~> 1.4.8)
|
57
|
+
mime-types (1.25.1)
|
58
|
+
multi_json (1.9.2)
|
59
|
+
multi_test (0.1.1)
|
60
|
+
polyglot (0.3.4)
|
61
|
+
rack (1.4.5)
|
62
|
+
rack-cache (1.2)
|
63
|
+
rack (>= 0.4)
|
64
|
+
rack-ssl (1.3.4)
|
65
|
+
rack
|
66
|
+
rack-test (0.6.2)
|
67
|
+
rack (>= 1.0)
|
68
|
+
rails (3.2.17)
|
69
|
+
actionmailer (= 3.2.17)
|
70
|
+
actionpack (= 3.2.17)
|
71
|
+
activerecord (= 3.2.17)
|
72
|
+
activeresource (= 3.2.17)
|
73
|
+
activesupport (= 3.2.17)
|
74
|
+
bundler (~> 1.0)
|
75
|
+
railties (= 3.2.17)
|
76
|
+
railties (3.2.17)
|
77
|
+
actionpack (= 3.2.17)
|
78
|
+
activesupport (= 3.2.17)
|
79
|
+
rack-ssl (~> 1.3.2)
|
80
|
+
rake (>= 0.8.7)
|
81
|
+
rdoc (~> 3.4)
|
82
|
+
thor (>= 0.14.6, < 2.0)
|
83
|
+
rake (10.2.1)
|
84
|
+
rdoc (3.12.2)
|
85
|
+
json (~> 1.4)
|
86
|
+
rspec (2.14.1)
|
87
|
+
rspec-core (~> 2.14.0)
|
88
|
+
rspec-expectations (~> 2.14.0)
|
89
|
+
rspec-mocks (~> 2.14.0)
|
90
|
+
rspec-core (2.14.8)
|
91
|
+
rspec-expectations (2.14.5)
|
92
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
93
|
+
rspec-mocks (2.14.6)
|
94
|
+
rspec-rails (2.14.2)
|
95
|
+
actionpack (>= 3.0)
|
96
|
+
activemodel (>= 3.0)
|
97
|
+
activesupport (>= 3.0)
|
98
|
+
railties (>= 3.0)
|
99
|
+
rspec-core (~> 2.14.0)
|
100
|
+
rspec-expectations (~> 2.14.0)
|
101
|
+
rspec-mocks (~> 2.14.0)
|
102
|
+
sprockets (2.2.2)
|
103
|
+
hike (~> 1.2)
|
104
|
+
multi_json (~> 1.0)
|
105
|
+
rack (~> 1.0)
|
106
|
+
tilt (~> 1.1, != 1.3.0)
|
107
|
+
sqlite3 (1.3.9)
|
108
|
+
thor (0.19.1)
|
109
|
+
tilt (1.4.1)
|
110
|
+
treetop (1.4.15)
|
111
|
+
polyglot
|
112
|
+
polyglot (>= 0.3.1)
|
113
|
+
tzinfo (0.3.39)
|
114
|
+
|
115
|
+
PLATFORMS
|
116
|
+
ruby
|
117
|
+
|
118
|
+
DEPENDENCIES
|
119
|
+
cucumber (< 2)
|
120
|
+
cucumber_factory!
|
121
|
+
rails (~> 3.2)
|
122
|
+
rspec
|
123
|
+
rspec-rails
|
124
|
+
sqlite3
|
data/spec/rails-4.0/Gemfile
CHANGED
@@ -0,0 +1,119 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
cucumber_factory (1.11.0)
|
5
|
+
activesupport
|
6
|
+
cucumber
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionmailer (4.0.4)
|
12
|
+
actionpack (= 4.0.4)
|
13
|
+
mail (~> 2.5.4)
|
14
|
+
actionpack (4.0.4)
|
15
|
+
activesupport (= 4.0.4)
|
16
|
+
builder (~> 3.1.0)
|
17
|
+
erubis (~> 2.7.0)
|
18
|
+
rack (~> 1.5.2)
|
19
|
+
rack-test (~> 0.6.2)
|
20
|
+
activemodel (4.0.4)
|
21
|
+
activesupport (= 4.0.4)
|
22
|
+
builder (~> 3.1.0)
|
23
|
+
activerecord (4.0.4)
|
24
|
+
activemodel (= 4.0.4)
|
25
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
26
|
+
activesupport (= 4.0.4)
|
27
|
+
arel (~> 4.0.0)
|
28
|
+
activerecord-deprecated_finders (1.0.3)
|
29
|
+
activesupport (4.0.4)
|
30
|
+
i18n (~> 0.6, >= 0.6.9)
|
31
|
+
minitest (~> 4.2)
|
32
|
+
multi_json (~> 1.3)
|
33
|
+
thread_safe (~> 0.1)
|
34
|
+
tzinfo (~> 0.3.37)
|
35
|
+
arel (4.0.2)
|
36
|
+
atomic (1.1.16)
|
37
|
+
builder (3.1.4)
|
38
|
+
cucumber (1.3.15)
|
39
|
+
builder (>= 2.1.2)
|
40
|
+
diff-lcs (>= 1.1.3)
|
41
|
+
gherkin (~> 2.12)
|
42
|
+
multi_json (>= 1.7.5, < 2.0)
|
43
|
+
multi_test (>= 0.1.1)
|
44
|
+
diff-lcs (1.2.5)
|
45
|
+
erubis (2.7.0)
|
46
|
+
gherkin (2.12.2)
|
47
|
+
multi_json (~> 1.3)
|
48
|
+
hike (1.2.3)
|
49
|
+
i18n (0.6.9)
|
50
|
+
mail (2.5.4)
|
51
|
+
mime-types (~> 1.16)
|
52
|
+
treetop (~> 1.4.8)
|
53
|
+
mime-types (1.25.1)
|
54
|
+
minitest (4.7.5)
|
55
|
+
multi_json (1.9.2)
|
56
|
+
multi_test (0.1.1)
|
57
|
+
polyglot (0.3.4)
|
58
|
+
rack (1.5.2)
|
59
|
+
rack-test (0.6.2)
|
60
|
+
rack (>= 1.0)
|
61
|
+
rails (4.0.4)
|
62
|
+
actionmailer (= 4.0.4)
|
63
|
+
actionpack (= 4.0.4)
|
64
|
+
activerecord (= 4.0.4)
|
65
|
+
activesupport (= 4.0.4)
|
66
|
+
bundler (>= 1.3.0, < 2.0)
|
67
|
+
railties (= 4.0.4)
|
68
|
+
sprockets-rails (~> 2.0.0)
|
69
|
+
railties (4.0.4)
|
70
|
+
actionpack (= 4.0.4)
|
71
|
+
activesupport (= 4.0.4)
|
72
|
+
rake (>= 0.8.7)
|
73
|
+
thor (>= 0.18.1, < 2.0)
|
74
|
+
rake (10.2.1)
|
75
|
+
rspec (2.13.0)
|
76
|
+
rspec-core (~> 2.13.0)
|
77
|
+
rspec-expectations (~> 2.13.0)
|
78
|
+
rspec-mocks (~> 2.13.0)
|
79
|
+
rspec-core (2.13.1)
|
80
|
+
rspec-expectations (2.13.0)
|
81
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
82
|
+
rspec-mocks (2.13.1)
|
83
|
+
rspec-rails (2.13.2)
|
84
|
+
actionpack (>= 3.0)
|
85
|
+
activesupport (>= 3.0)
|
86
|
+
railties (>= 3.0)
|
87
|
+
rspec-core (~> 2.13.0)
|
88
|
+
rspec-expectations (~> 2.13.0)
|
89
|
+
rspec-mocks (~> 2.13.0)
|
90
|
+
sprockets (2.12.0)
|
91
|
+
hike (~> 1.2)
|
92
|
+
multi_json (~> 1.0)
|
93
|
+
rack (~> 1.0)
|
94
|
+
tilt (~> 1.1, != 1.3.0)
|
95
|
+
sprockets-rails (2.0.1)
|
96
|
+
actionpack (>= 3.0)
|
97
|
+
activesupport (>= 3.0)
|
98
|
+
sprockets (~> 2.8)
|
99
|
+
sqlite3 (1.3.9)
|
100
|
+
thor (0.19.1)
|
101
|
+
thread_safe (0.3.1)
|
102
|
+
atomic (>= 1.1.7, < 2)
|
103
|
+
tilt (1.4.1)
|
104
|
+
treetop (1.4.15)
|
105
|
+
polyglot
|
106
|
+
polyglot (>= 0.3.1)
|
107
|
+
tzinfo (0.3.39)
|
108
|
+
|
109
|
+
PLATFORMS
|
110
|
+
ruby
|
111
|
+
|
112
|
+
DEPENDENCIES
|
113
|
+
cucumber (< 2)
|
114
|
+
cucumber_factory!
|
115
|
+
minitest
|
116
|
+
rails (~> 4.0)
|
117
|
+
rspec (~> 2.13.0)
|
118
|
+
rspec-rails
|
119
|
+
sqlite3
|
@@ -45,6 +45,12 @@ describe 'steps provided by cucumber_factory' do
|
|
45
45
|
invoke_cucumber_step('there is a job offer (tempting job offer) with the title "Awesomafiablyfantasmic job"')
|
46
46
|
end
|
47
47
|
|
48
|
+
it "should create model variants that have a factory_girl trait by calling #FactoryGirl.create(:factory, :trait1, :trait2)" do
|
49
|
+
FactoryGirl.stub_factories :tempting_job_offer => JobOffer
|
50
|
+
FactoryGirl.should_receive(:create).with(:tempting_job_offer, :risky, :lucrative, { :title => "Awesomafiablyfantasmic job" })
|
51
|
+
invoke_cucumber_step('there is a tempting job offer (risky, lucrative) with the title "Awesomafiablyfantasmic job"')
|
52
|
+
end
|
53
|
+
|
48
54
|
it "should create model variants that have a factory_girl factory by using the model name as a factory name" do
|
49
55
|
FactoryGirl.stub_factories :tempting_job_offer => JobOffer
|
50
56
|
FactoryGirl.should_receive(:create).with(:tempting_job_offer, { :title => "Awesomafiablyfantasmic job" })
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber_factory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.11.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -126,7 +126,9 @@ files:
|
|
126
126
|
- lib/cucumber_factory.rb
|
127
127
|
- lib/cucumber_factory/switcher.rb
|
128
128
|
- lib/cucumber_factory/version.rb
|
129
|
+
- spec/app_root/log/.keep
|
129
130
|
- spec/rails-2.3/Gemfile
|
131
|
+
- spec/rails-2.3/Gemfile.lock
|
130
132
|
- spec/rails-2.3/Rakefile
|
131
133
|
- spec/rails-2.3/app_root/config/boot.rb
|
132
134
|
- spec/rails-2.3/app_root/config/database.yml
|
@@ -140,6 +142,7 @@ files:
|
|
140
142
|
- spec/rails-2.3/spec/spec_helper.rb
|
141
143
|
- spec/rails-3.0/.rspec
|
142
144
|
- spec/rails-3.0/Gemfile
|
145
|
+
- spec/rails-3.0/Gemfile.lock
|
143
146
|
- spec/rails-3.0/Rakefile
|
144
147
|
- spec/rails-3.0/app_root/.gitignore
|
145
148
|
- spec/rails-3.0/app_root/config/application.rb
|
@@ -158,6 +161,7 @@ files:
|
|
158
161
|
- spec/rails-3.0/spec/spec_helper.rb
|
159
162
|
- spec/rails-3.2/.rspec
|
160
163
|
- spec/rails-3.2/Gemfile
|
164
|
+
- spec/rails-3.2/Gemfile.lock
|
161
165
|
- spec/rails-3.2/Rakefile
|
162
166
|
- spec/rails-3.2/app_root/.gitignore
|
163
167
|
- spec/rails-3.2/app_root/config/application.rb
|
@@ -176,6 +180,7 @@ files:
|
|
176
180
|
- spec/rails-3.2/spec/spec_helper.rb
|
177
181
|
- spec/rails-4.0/.rspec
|
178
182
|
- spec/rails-4.0/Gemfile
|
183
|
+
- spec/rails-4.0/Gemfile.lock
|
179
184
|
- spec/rails-4.0/Rakefile
|
180
185
|
- spec/rails-4.0/app_root/.gitignore
|
181
186
|
- spec/rails-4.0/app_root/config/application.rb
|
@@ -238,4 +243,3 @@ signing_key:
|
|
238
243
|
specification_version: 3
|
239
244
|
summary: Create records from Cucumber features without writing step definitions.
|
240
245
|
test_files: []
|
241
|
-
has_rdoc:
|