pickle 0.5.4 → 0.6.2
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 +5 -5
- data/.github/workflows/build.yml +65 -0
- data/.gitignore +2 -0
- data/.travis.yml +18 -5
- data/History.txt +54 -38
- data/README.md +15 -22
- data/Rakefile.d/cucumber.rake +11 -3
- data/features/app/app.rb +7 -7
- data/features/app/factories.rb +1 -1
- data/features/step_definitions/email_steps.rb +1 -1
- data/features/step_definitions/pickle_steps.rb +1 -1
- data/features/support/email.rb +1 -1
- data/gemfiles/Gemfile-rails.4.2.x +13 -0
- data/gemfiles/Gemfile-rails.4.2.x.lock +214 -0
- data/gemfiles/Gemfile-rails.5.0.x +12 -0
- data/gemfiles/Gemfile-rails.5.1.x +10 -0
- data/gemfiles/Gemfile-rails.5.2.x +11 -0
- data/gemfiles/Gemfile-rails.5.2.x-cukes-4 +11 -0
- data/gemfiles/Gemfile-rails.5.2.x-cukes-5 +11 -0
- data/gemfiles/Gemfile-rails.6.0.x-cukes-3 +10 -0
- data/gemfiles/Gemfile-rails.6.0.x-cukes-4 +10 -0
- data/gemfiles/Gemfile-rails.6.0.x-cukes-5 +11 -0
- data/gemfiles/Gemfile-rails.6.0.x-cukes-6 +11 -0
- data/gemfiles/Gemfile-rails.6.0.x-cukes-7 +11 -0
- data/gemfiles/Gemfile-rails.6.1.x-cukes-3 +10 -0
- data/gemfiles/Gemfile-rails.6.1.x-cukes-4 +10 -0
- data/gemfiles/Gemfile-rails.6.1.x-cukes-5 +11 -0
- data/gemfiles/Gemfile-rails.6.1.x-cukes-6 +11 -0
- data/gemfiles/Gemfile-rails.6.1.x-cukes-7 +11 -0
- data/{Gemfile → gemfiles/Gemfile-rails.edge} +3 -1
- data/lib/pickle/version.rb +1 -1
- data/pickle.gemspec +5 -5
- metadata +38 -52
- data/Gemfile.lock +0 -201
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 102419954ec2e775d587cba02b8b224fef878fc42c90ebe826c10428f5656883
|
|
4
|
+
data.tar.gz: 9f11eded1fa3778e55f8959de6288ed4c5a5b48f38b5faf6ba30449861548f8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 414987a1c3daa241ecab8f4d1bdb9878c7d72e35c6f5bb39d11f9d06be8d43da585df72ed8771d28c94cd0f9e4d8e3d01c43f918529dd0512b70c4f42cbcfe2b
|
|
7
|
+
data.tar.gz: 6492c3737c4538f91408609f481d82600323b1a3fa67bb45e0df4fcf5d5877eab17f4d463a820f5ee5e383a83ee4651a99a93179e22fe9821a38a3173e76e27f
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
+
|
|
8
|
+
name: build
|
|
9
|
+
|
|
10
|
+
on: [push, pull_request]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ubuntu-20.04
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
ruby:
|
|
19
|
+
- 3.0
|
|
20
|
+
- 2.7
|
|
21
|
+
- 2.6
|
|
22
|
+
- 2.5
|
|
23
|
+
gemfile:
|
|
24
|
+
# Cucumber 3.2+
|
|
25
|
+
- Gemfile-rails.4.2.x
|
|
26
|
+
- Gemfile-rails.5.0.x
|
|
27
|
+
- Gemfile-rails.5.1.x
|
|
28
|
+
- Gemfile-rails.5.2.x
|
|
29
|
+
- Gemfile-rails.6.0.x-cukes-3
|
|
30
|
+
- Gemfile-rails.6.1.x-cukes-3
|
|
31
|
+
# Cucumber 4.1+
|
|
32
|
+
- Gemfile-rails.5.2.x-cukes-4
|
|
33
|
+
- Gemfile-rails.6.0.x-cukes-4
|
|
34
|
+
# Cucumber 5.3+
|
|
35
|
+
- Gemfile-rails.5.2.x-cukes-5
|
|
36
|
+
- Gemfile-rails.6.0.x-cukes-5
|
|
37
|
+
- Gemfile-rails.6.1.x-cukes-5
|
|
38
|
+
# Cucumber 6
|
|
39
|
+
- Gemfile-rails.6.0.x-cukes-6
|
|
40
|
+
- Gemfile-rails.6.1.x-cukes-6
|
|
41
|
+
# Cucumber 7
|
|
42
|
+
- Gemfile-rails.6.0.x-cukes-7
|
|
43
|
+
- Gemfile-rails.6.1.x-cukes-7
|
|
44
|
+
# Edge
|
|
45
|
+
- Gemfile-rails.edge
|
|
46
|
+
exclude:
|
|
47
|
+
# Rails edge is now 7.x and requires ruby 2.7
|
|
48
|
+
- gemfile: Gemfile-rails.edge
|
|
49
|
+
ruby: 2.6
|
|
50
|
+
- gemfile: Gemfile-rails.edge
|
|
51
|
+
ruby: 2.5
|
|
52
|
+
- gemfile: Gemfile-rails.4.2.x
|
|
53
|
+
ruby: 2.7
|
|
54
|
+
- gemfile: Gemfile-rails.4.2.x
|
|
55
|
+
ruby: 3.0
|
|
56
|
+
|
|
57
|
+
env:
|
|
58
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v2
|
|
61
|
+
- uses: ruby/setup-ruby@v1
|
|
62
|
+
with:
|
|
63
|
+
ruby-version: ${{ matrix.ruby }}
|
|
64
|
+
bundler-cache: true
|
|
65
|
+
- run: bundle exec rake
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
|
@@ -2,13 +2,26 @@ language: ruby
|
|
|
2
2
|
dist: xenial
|
|
3
3
|
cache: bundler
|
|
4
4
|
rvm:
|
|
5
|
-
|
|
6
|
-
- 2.
|
|
7
|
-
- 2.
|
|
8
|
-
-
|
|
5
|
+
#- 2.7.1
|
|
6
|
+
- 2.6.6
|
|
7
|
+
- 2.5.8
|
|
8
|
+
#- ruby-head
|
|
9
|
+
gemfile:
|
|
10
|
+
- gemfiles/Gemfile-rails.5.0.x
|
|
11
|
+
- gemfiles/Gemfile-rails.5.1.x
|
|
12
|
+
- gemfiles/Gemfile-rails.5.2.x
|
|
13
|
+
- gemfiles/Gemfile-rails.5.2.x-cukes-4
|
|
14
|
+
- gemfiles/Gemfile-rails.5.2.x-cukes-5
|
|
15
|
+
- gemfiles/Gemfile-rails.6.0.x
|
|
16
|
+
- gemfiles/Gemfile-rails.6.0.x-cukes-5
|
|
17
|
+
#- gemfiles/Gemfile-rails.edge
|
|
9
18
|
matrix:
|
|
10
19
|
allow_failures:
|
|
11
|
-
- rvm:
|
|
20
|
+
- rvm: ruby-head
|
|
21
|
+
- rvm: 2.7.1
|
|
22
|
+
- gemfile: gemfiles/Gemfile-rails.edge
|
|
23
|
+
- gemfile: gemfiles/Gemfile-rails.5.2.x-cukes-5
|
|
24
|
+
- gemfile: gemfiles/Gemfile-rails.6.0.x-cukes-5
|
|
12
25
|
fast_finish: true
|
|
13
26
|
|
|
14
27
|
script:
|
data/History.txt
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
|
+
== 0.6.2
|
|
2
|
+
* Relax dependency to support cucumber 7.x
|
|
3
|
+
|
|
4
|
+
== 0.6.1
|
|
5
|
+
* Relax dependency to support cucumber 6.x
|
|
6
|
+
|
|
7
|
+
== 0.6.0
|
|
8
|
+
* Drop support for cucumber < 3
|
|
9
|
+
* Officially support cucumber 4.1
|
|
10
|
+
* Relax dependency to support cucumber 5.x although not officially supported
|
|
11
|
+
* Run tests for Rails 5.0, 5.1, 5.2 and 6.0
|
|
12
|
+
|
|
13
|
+
== 0.5.5
|
|
14
|
+
* Relax dependency on cucumber to allow usage with Rails 5.2 [Yohei Kitamura]
|
|
15
|
+
|
|
1
16
|
== 0.5.4
|
|
2
|
-
* updated FactoryGirl to FactoryBot
|
|
17
|
+
* updated FactoryGirl to FactoryBot [Blake McDaniel]
|
|
3
18
|
|
|
4
19
|
== 0.5.3
|
|
5
|
-
* small fix to pickle_path_for_resources_action_segment
|
|
6
|
-
* update for fabrication adapter with protected method klass
|
|
20
|
+
* small fix to pickle_path_for_resources_action_segment [Tema Bolshakov]
|
|
21
|
+
* update for fabrication adapter with protected method klass [Liam Krewer]
|
|
22
|
+
* Fix tests to run on travis again and codecoverage [Mathieu Jobin]
|
|
7
23
|
|
|
8
24
|
== 0.5.2
|
|
9
|
-
* replace alias_method_chain by Module#prepend
|
|
25
|
+
* replace alias_method_chain by Module#prepend [Mathieu Jobin]
|
|
10
26
|
eliminating deprecation warnings when using with Rails 5
|
|
11
27
|
|
|
12
28
|
== 0.5.1
|
|
@@ -40,7 +56,7 @@
|
|
|
40
56
|
|
|
41
57
|
* 1 bugfix
|
|
42
58
|
* Don't blow up when fabrication not present [Ian White]
|
|
43
|
-
|
|
59
|
+
|
|
44
60
|
|
|
45
61
|
== 0.4.9
|
|
46
62
|
|
|
@@ -49,8 +65,8 @@
|
|
|
49
65
|
|
|
50
66
|
* 1 minor improvement
|
|
51
67
|
* Update development dependencies so tests/features run on rails 3.1 and friends
|
|
52
|
-
|
|
53
|
-
|
|
68
|
+
|
|
69
|
+
|
|
54
70
|
== 0.4.8
|
|
55
71
|
|
|
56
72
|
* 2 minor improvements
|
|
@@ -63,7 +79,7 @@
|
|
|
63
79
|
* 2 minor improvements
|
|
64
80
|
* Better error message for failing to find a model [Ian White, reported by Yuval Karmi]
|
|
65
81
|
* dev deps updated to latest cucumber & cucumber-rails [Ian White]
|
|
66
|
-
|
|
82
|
+
|
|
67
83
|
|
|
68
84
|
== 0.4.6
|
|
69
85
|
Documentation updates
|
|
@@ -86,7 +102,7 @@ large object space fix, and allow escaped quotes as string values
|
|
|
86
102
|
* 1 bugfix
|
|
87
103
|
* When using super-huge GC limits (for speeding up tests), occasionally we'll see abandoned Mongoid::Document classes appear in the ObjectSpace.
|
|
88
104
|
This patch should fix that. [Devin Walters and Nick Karpenske]
|
|
89
|
-
|
|
105
|
+
|
|
90
106
|
* 1 improvement
|
|
91
107
|
* allow escaped quotes (\") in quoted fields [Jonathan Hinkle]
|
|
92
108
|
|
|
@@ -110,7 +126,7 @@ Docfix
|
|
|
110
126
|
|
|
111
127
|
* 1 improvement
|
|
112
128
|
* documentation fixes, and example of writing your own pickle steps
|
|
113
|
-
|
|
129
|
+
|
|
114
130
|
|
|
115
131
|
== 0.4.0
|
|
116
132
|
Mongoid adapter, fallback ORM adapter for those not using machinist or active_record, bugfixes
|
|
@@ -118,9 +134,9 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
118
134
|
* 2 major improvements
|
|
119
135
|
* adapter for Mongoid [Sebastian Zuchmanski]
|
|
120
136
|
* replace ActiveRecord 'factory' adapter with Orm adapter.
|
|
121
|
-
|
|
137
|
+
|
|
122
138
|
If you don't have machinist or factory_girl, the Orm factory adapter will fallback to your Orm to create classes.
|
|
123
|
-
|
|
139
|
+
|
|
124
140
|
BC: if you have a line like this:
|
|
125
141
|
Pickle.configure do |config|
|
|
126
142
|
config.adapters = [:active_record]
|
|
@@ -130,10 +146,10 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
130
146
|
Pickle.configure do |config|
|
|
131
147
|
config.adapters = [:orm]
|
|
132
148
|
end
|
|
133
|
-
|
|
149
|
+
|
|
134
150
|
* 1 minor improvement
|
|
135
151
|
* Pickle::Session::ModelNotKnownError is raised instead of a generic RuntimeError
|
|
136
|
-
|
|
152
|
+
|
|
137
153
|
* 1 bugfix
|
|
138
154
|
* references to unknown models in fields now raise ModelNotKnownError instead of silently assigning nil
|
|
139
155
|
|
|
@@ -147,7 +163,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
147
163
|
|
|
148
164
|
* 1 bugfix
|
|
149
165
|
* find_models now works with a factory name with spaces in it [#27]
|
|
150
|
-
|
|
166
|
+
|
|
151
167
|
|
|
152
168
|
== 0.3.4
|
|
153
169
|
|
|
@@ -160,7 +176,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
160
176
|
|
|
161
177
|
* 1 minor improvement
|
|
162
178
|
* Pickle respects the default build strategy for factory girl. [Sean Hussey]
|
|
163
|
-
|
|
179
|
+
|
|
164
180
|
|
|
165
181
|
== 0.3.2
|
|
166
182
|
|
|
@@ -193,7 +209,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
193
209
|
== 0.2.11
|
|
194
210
|
|
|
195
211
|
* 1 improvement
|
|
196
|
-
* use correct type when converting STI pickle model to attributes
|
|
212
|
+
* use correct type when converting STI pickle model to attributes
|
|
197
213
|
|
|
198
214
|
|
|
199
215
|
== 0.2.10
|
|
@@ -230,8 +246,8 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
230
246
|
* 2 improvements
|
|
231
247
|
* running specs is now doable without being in a rails app - just do 'rake spec'
|
|
232
248
|
* running features is more straightforward, 'rake cucumber' then follow the instructions
|
|
233
|
-
|
|
234
|
-
|
|
249
|
+
|
|
250
|
+
|
|
235
251
|
== 0.2.5 - 17 Mar 2010
|
|
236
252
|
|
|
237
253
|
* 2 improvements
|
|
@@ -256,7 +272,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
256
272
|
| user | name | status |
|
|
257
273
|
| jack | Jack Spratt | alone |
|
|
258
274
|
| pete | Pete Sprong | dead |
|
|
259
|
-
|
|
275
|
+
|
|
260
276
|
* 1 minor improvement
|
|
261
277
|
* Fix bug in error message for when pickle ref can't be found [Myron Marston]
|
|
262
278
|
|
|
@@ -267,8 +283,8 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
267
283
|
* Added ability to follow links in emails (see email_steps.rb) [Michael Moen]
|
|
268
284
|
* Added a step definition for doing stuff like: Then the user's name should be "Tobi" [Tobi Knaup]
|
|
269
285
|
* Docfixes, mostly about testing [Nicholas Rutherford]
|
|
270
|
-
|
|
271
|
-
|
|
286
|
+
|
|
287
|
+
|
|
272
288
|
== 0.2.1 - 1 Dec 2009
|
|
273
289
|
|
|
274
290
|
* 2 minor improvements
|
|
@@ -287,11 +303,11 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
287
303
|
| Ethel |
|
|
288
304
|
And the 1st user should be male
|
|
289
305
|
And the 2nd user should be female
|
|
290
|
-
|
|
306
|
+
|
|
291
307
|
* tables now support pickle refs in cells (see features/pickle/create_from_factory_girl.rb#37)
|
|
292
|
-
|
|
308
|
+
|
|
293
309
|
* features/support/email.rb adds an email helper for mapping names to email addresses (similar to NavigationHelper in paths.rb)
|
|
294
|
-
|
|
310
|
+
|
|
295
311
|
* Added ability for path_to_pickle to handle arbitrary segments
|
|
296
312
|
Example:
|
|
297
313
|
path_to_pickle('account', 'the enquiry') => account_enquiry_path(<enquiry>)
|
|
@@ -316,7 +332,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
316
332
|
|
|
317
333
|
* 1 minor improvement
|
|
318
334
|
* docs: more links
|
|
319
|
-
|
|
335
|
+
|
|
320
336
|
|
|
321
337
|
== 0.1.22 - 7 Nov 2009
|
|
322
338
|
|
|
@@ -341,7 +357,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
341
357
|
|
|
342
358
|
* 1 minor enhancement
|
|
343
359
|
* Add support for Cucumber tables [Tobi Knaup]
|
|
344
|
-
|
|
360
|
+
|
|
345
361
|
|
|
346
362
|
== 0.1.16, 0.1.17, 0.1.18 - 13 Oct 2009
|
|
347
363
|
|
|
@@ -361,7 +377,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
361
377
|
* update specs and features for latest cucumber and machinist changes
|
|
362
378
|
|
|
363
379
|
|
|
364
|
-
== 0.1.13 - 16 June 2009
|
|
380
|
+
== 0.1.13 - 16 June 2009
|
|
365
381
|
|
|
366
382
|
* 2 minor enhancements
|
|
367
383
|
* model! and created_model! raise an error if pickle name can't be found
|
|
@@ -379,7 +395,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
379
395
|
|
|
380
396
|
* 2 minor enhancements
|
|
381
397
|
* Pickle now supports multiple machinist blueprints
|
|
382
|
-
* Fix confusing adapter/adaptor comment generator comment
|
|
398
|
+
* Fix confusing adapter/adaptor comment generator comment
|
|
383
399
|
|
|
384
400
|
|
|
385
401
|
== 0.1.10 - 13 Feb 2009
|
|
@@ -410,7 +426,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
410
426
|
* 2 API changes
|
|
411
427
|
* script/generate pickle path[s] now amends the features/support/paths.rb file
|
|
412
428
|
instead of creating pge_to_path and path_steps.
|
|
413
|
-
|
|
429
|
+
|
|
414
430
|
* pickle_email_steps is renamed email_steps
|
|
415
431
|
|
|
416
432
|
|
|
@@ -424,22 +440,22 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
424
440
|
|
|
425
441
|
* generate email steps with `script/generate pickle email`
|
|
426
442
|
email steps allow you to do things like this:
|
|
427
|
-
|
|
443
|
+
|
|
428
444
|
Then 2 emails should be delivered
|
|
429
445
|
And the first email should be delivered to fred@gmail.com
|
|
430
446
|
And the 2nd email should be delivered to the user: "ethel"
|
|
431
|
-
|
|
447
|
+
|
|
432
448
|
Then 1 email should be delivered with subject: "Activate your account"
|
|
433
449
|
And the email should link to the user's page
|
|
434
|
-
|
|
450
|
+
|
|
435
451
|
take a look at features/step_definitions/pickle_email_steps.rb
|
|
436
|
-
|
|
452
|
+
|
|
437
453
|
* generate path steps with `script/generate pickle path`
|
|
438
454
|
path steps allow you to do things like this
|
|
439
|
-
|
|
455
|
+
|
|
440
456
|
When I go to the comment's page
|
|
441
457
|
Then I should be at the user's new comment page
|
|
442
|
-
|
|
458
|
+
|
|
443
459
|
take a look at features/step_definitions/pickle_path_steps.rb, and modify page_to_path to suit your needs
|
|
444
460
|
|
|
445
461
|
* 4 minor enhancements
|
|
@@ -464,7 +480,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
464
480
|
for much more intuitive env.rb
|
|
465
481
|
|
|
466
482
|
* 2 minor enhancement
|
|
467
|
-
* predicate matching is less prone to step conflicts because we preload a
|
|
483
|
+
* predicate matching is less prone to step conflicts because we preload a
|
|
468
484
|
big list of all the predicate and column methods
|
|
469
485
|
* field values now handle booleans and numerics
|
|
470
486
|
|
|
@@ -490,7 +506,7 @@ Mongoid adapter, fallback ORM adapter for those not using machinist or active_re
|
|
|
490
506
|
* 2 major enhancements
|
|
491
507
|
* create your pickle steps with script/generate pickle
|
|
492
508
|
* Adapter based architecture, supports Machinist, FactoryGirl, and vanilla ActiveRecord
|
|
493
|
-
|
|
509
|
+
|
|
494
510
|
* 1 minor enhancement
|
|
495
511
|
* model_names now defaults to subclasses of AR::Base
|
|
496
512
|
* #original_model => #created_model
|
data/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# pickle
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
[](https://github.com/ianwhite/pickle/actions/workflows/build.yml)
|
|
4
5
|
|
|
5
6
|
Pickle gives you cucumber steps that create your models easily from factory-girl, machinist, or fabrication. You can also just use ActiveRecord as a factory but it's not as cool. Pickle can make use of different ORMs for finding records. Currently ActiveRecord, DataMapper, MongoID adapters are provided. More adapters welcome!
|
|
6
7
|
|
|
@@ -10,7 +11,19 @@ References to the models are stored in the current world, not necessarily for th
|
|
|
10
11
|
|
|
11
12
|
This is a quickstart guide for rails apps. Firstly, install [cucumber-rails](http://github.com/aslakhellesoy/cucumber-rails), and its dependencies. Then do the following:
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
## Supported versions
|
|
15
|
+
|
|
16
|
+
Cucumber 2.x - support was dropped from release 0.6.0
|
|
17
|
+
Cucumber 3.x - support is best-effort basis, but tests run on rails 4.2 all the way until 6.1
|
|
18
|
+
Cucumber 4.x - should work with all Rails 5.x versions, tests only run for 5.2 and 6.0
|
|
19
|
+
Cucumber 5.x - all tests pass for rails 5.2, 6.0 and 6.1
|
|
20
|
+
Cucumber 6.x - all tests pass for rails 6.0 and 6.1
|
|
21
|
+
Cucumber 7.x - all tests pass for rails 6.0 and 6.1
|
|
22
|
+
|
|
23
|
+
Please open pull-requests with fixes if you encounter any problems.
|
|
24
|
+
No active development on this gem.
|
|
25
|
+
|
|
26
|
+
### Rails 5 and Rails 6
|
|
14
27
|
|
|
15
28
|
Add the gem to your Gemfile:
|
|
16
29
|
|
|
@@ -36,26 +49,6 @@ Run the generator, e.g:
|
|
|
36
49
|
rails g pickle --paths --email
|
|
37
50
|
```
|
|
38
51
|
|
|
39
|
-
### For Rails 2:
|
|
40
|
-
|
|
41
|
-
Add the following to config/environments/cucumber:
|
|
42
|
-
|
|
43
|
-
```ruby
|
|
44
|
-
config.gem 'pickle'
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Install the gem with
|
|
48
|
-
|
|
49
|
-
```shell
|
|
50
|
-
rake gems:install RAILS_ENV=cucumber
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Run the generator with:
|
|
54
|
-
|
|
55
|
-
```ruby
|
|
56
|
-
script/generate pickle [paths] [email]
|
|
57
|
-
```
|
|
58
|
-
|
|
59
52
|
## Resources
|
|
60
53
|
|
|
61
54
|
**GitHub** for code: https://github.com/ianwhite/pickle
|
data/Rakefile.d/cucumber.rake
CHANGED
|
@@ -2,7 +2,7 @@ require 'cucumber/rake/task'
|
|
|
2
2
|
|
|
3
3
|
desc "Run features"
|
|
4
4
|
Cucumber::Rake::Task.new(:cucumber => [:cucumber_test_app]) do |t|
|
|
5
|
-
t.cucumber_opts = %w[--format pretty --require features -t
|
|
5
|
+
t.cucumber_opts = %w[--format pretty --require features -t] + ["'not @wip'"]
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
desc "setup a rails app for running cucumber"
|
|
@@ -13,13 +13,21 @@ end
|
|
|
13
13
|
|
|
14
14
|
namespace :cucumber do
|
|
15
15
|
task :setup do
|
|
16
|
+
current_gemfile = ENV['BUNDLE_GEMFILE']
|
|
17
|
+
sh "BUNDLE_GEMFILE=#{current_gemfile} bundle show cucumber > /tmp/cukes_version"
|
|
18
|
+
sh "BUNDLE_GEMFILE=#{current_gemfile} bundle show sqlite3 > /tmp/sqlite_version"
|
|
19
|
+
cukes_version=File.read('/tmp/cukes_version').split('-').last.chomp
|
|
20
|
+
sqlite_version=File.read('/tmp/sqlite_version').split('-').last.chomp
|
|
21
|
+
puts "Versions: Cucumber #{cukes_version}, SQLite #{sqlite_version}."
|
|
16
22
|
Bundler.with_clean_env do
|
|
17
23
|
gemfile = "cucumber_test_app/Gemfile"
|
|
18
24
|
rm_rf "cucumber_test_app"
|
|
19
|
-
sh "bundle exec rails new cucumber_test_app --skip-spring --skip-javascript --skip-sprockets"
|
|
25
|
+
sh "BUNDLE_GEMFILE=#{current_gemfile} bundle exec rails new cucumber_test_app --skip-spring --skip-javascript --skip-sprockets --skip-bootsnap"
|
|
26
|
+
sh "echo 'gem \"cucumber\", \"~> #{cukes_version}\", :require => false' >> #{gemfile}"
|
|
27
|
+
sh "sed -i 's/gem .sqlite3./gem \"sqlite3\", \"~> #{sqlite_version}\"/' #{gemfile}"
|
|
28
|
+
sh "cat #{gemfile} | grep sqli"
|
|
20
29
|
sh "echo 'gem \"cucumber-rails\", :require => false' >> #{gemfile}"
|
|
21
30
|
sh "echo 'gem \"rspec-rails\", \"~>3.0\"' >> #{gemfile}"
|
|
22
|
-
sh "echo 'gem \"capybara\"' >> #{gemfile}"
|
|
23
31
|
sh "echo 'gem \"pickle\", path: \"#{__dir__}/..\"' >> #{gemfile}"
|
|
24
32
|
sh "bundle install --gemfile=#{gemfile}"
|
|
25
33
|
sh "(cd cucumber_test_app ; bundle exec rake db:migrate)"
|
data/features/app/app.rb
CHANGED
|
@@ -90,19 +90,19 @@ end
|
|
|
90
90
|
# controllers
|
|
91
91
|
class DefaultController < ActionController::Base
|
|
92
92
|
def index
|
|
93
|
-
render :
|
|
93
|
+
render :plain => "index: I was invoked with #{request.path}"
|
|
94
94
|
end
|
|
95
|
-
|
|
95
|
+
|
|
96
96
|
def show
|
|
97
|
-
render :
|
|
97
|
+
render :plain => "show: I was invoked with #{request.path}"
|
|
98
98
|
end
|
|
99
|
-
|
|
99
|
+
|
|
100
100
|
def new
|
|
101
|
-
render :
|
|
101
|
+
render :plain => "new: I was invoked with #{request.path}"
|
|
102
102
|
end
|
|
103
|
-
|
|
103
|
+
|
|
104
104
|
def edit
|
|
105
|
-
render :
|
|
105
|
+
render :plain => "edit: I was invoked with #{request.path}"
|
|
106
106
|
end
|
|
107
107
|
end
|
|
108
108
|
|
data/features/app/factories.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
../../rails_generators/pickle/templates/email_steps.rb
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
../../rails_generators/pickle/templates/pickle_steps.rb
|
data/features/support/email.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
../../rails_generators/pickle/templates/email.rb
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
source "http://rubygems.org"
|
|
2
|
+
|
|
3
|
+
# Bundler 1.x default to insecure http:// for github: shortcut
|
|
4
|
+
git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
|
|
5
|
+
|
|
6
|
+
gemspec :path => ".."
|
|
7
|
+
|
|
8
|
+
gem "rails", "~> 4.2.9"
|
|
9
|
+
gem "cucumber", "~> 3.2.0"
|
|
10
|
+
gem "sqlite3", "~> 1.3.6"
|
|
11
|
+
gem "bundler", "~> 1.17"
|
|
12
|
+
|
|
13
|
+
gem 'fabrication', github: 'mathieujobin/fabrication', ref: '923cf6fcefd0566b1d6be7bd2f685b89388f4800'
|