cucumber_factory 2.0.0 → 2.0.1
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/CHANGELOG.md +10 -0
- data/Gemfile.cucumber-2.4.lock +1 -1
- data/Gemfile.cucumber-3.0.lock +1 -1
- data/Gemfile.cucumber-3.1.lock +1 -1
- data/lib/cucumber_factory/factory.rb +1 -1
- data/lib/cucumber_factory/version.rb +1 -1
- data/spec/cucumber_factory/steps_spec.rb +22 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0018303b5e8f5bdbd4beed10437846c6b51ccb3a241e04f134784569ac44f70e'
|
4
|
+
data.tar.gz: 3d57005ccf8fc284ee73b00abbd8c05e0e2994d9b1640c6cbc1d2dc487faa711
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dda3560f3d20781d18da3f536cd990704a191ba3cd5e0027b163f6303ab1192e4154c8550bbb8036a6d526b6999aa45a64e8e06d94096ee8fb0167085c8b09f
|
7
|
+
data.tar.gz: 1aade9eef28b0a68f1fbaae8e623cf4bf60d9287988efb3ad22ab266842b029d13e7da57f045deae9079930c5b36fa14a3a2406eeacb2c453b3755cb0a97a5aa
|
data/CHANGELOG.md
CHANGED
@@ -15,6 +15,16 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
15
15
|
|
16
16
|
-
|
17
17
|
|
18
|
+
## 2.0.1 - 2020-02-27
|
19
|
+
|
20
|
+
### Compatible changes
|
21
|
+
|
22
|
+
- Fix a bug that prevented created records to be named when using multiline attribute assignments
|
23
|
+
```
|
24
|
+
Given "Bob" is a user with these attributes:
|
25
|
+
| email | foo@bar.com |
|
26
|
+
```
|
27
|
+
|
18
28
|
## 2.0.0 - 2020-02-10
|
19
29
|
|
20
30
|
### Breaking changes
|
data/Gemfile.cucumber-2.4.lock
CHANGED
data/Gemfile.cucumber-3.0.lock
CHANGED
data/Gemfile.cucumber-3.1.lock
CHANGED
@@ -41,7 +41,7 @@ module CucumberFactory
|
|
41
41
|
|
42
42
|
NAMED_CREATION_STEP_DESCRIPTOR_WITH_TEXT_ATTRIBUTES = {
|
43
43
|
:kind => :Given,
|
44
|
-
:pattern =>
|
44
|
+
:pattern => /^#{NAMED_RECORD_PATTERN}#{ATTRIBUTES_PATTERN}#{TEXT_ATTRIBUTES_PATTERN}?$/,
|
45
45
|
:block => lambda { |a1, a2, a3, a4, a5, a6, a7| CucumberFactory::Factory.send(:parse_named_creation, self, a1, a2, a3, a4, a5, a6, a7) },
|
46
46
|
:priority => true
|
47
47
|
}
|
@@ -400,6 +400,17 @@ tags: ["foo", "bar"]
|
|
400
400
|
obj.attributes[:tags].should == ['foo', 'bar']
|
401
401
|
end
|
402
402
|
|
403
|
+
it 'should allow named records when setting attributes via doc string' do
|
404
|
+
invoke_cucumber_step('"Some Prequel" is a movie with these attributes:', <<-DOC_STRING)
|
405
|
+
title: Before Sunrise
|
406
|
+
DOC_STRING
|
407
|
+
invoke_cucumber_step('there is a movie with the title "Limitless"')
|
408
|
+
invoke_cucumber_step('there is a movie with the title "Before Sunset" and the prequel "Some Prequel"')
|
409
|
+
movie = Movie.find_by_title!('Before Sunset')
|
410
|
+
prequel = Movie.find_by_title!('Before Sunrise')
|
411
|
+
movie.prequel.should == prequel
|
412
|
+
end
|
413
|
+
|
403
414
|
it "should allow to set attributes via data table" do
|
404
415
|
user = User.new
|
405
416
|
User.stub(:new => user)
|
@@ -434,6 +445,17 @@ tags: ["foo", "bar"]
|
|
434
445
|
obj.attributes[:tags].should == ['foo', 'bar']
|
435
446
|
end
|
436
447
|
|
448
|
+
it 'should allow named records when setting attributes via data table' do
|
449
|
+
invoke_cucumber_step('"Some Prequel" is a movie with these attributes:', nil, <<-DATA_TABLE)
|
450
|
+
| title | Before Sunrise |
|
451
|
+
DATA_TABLE
|
452
|
+
invoke_cucumber_step('there is a movie with the title "Limitless"')
|
453
|
+
invoke_cucumber_step('there is a movie with the title "Before Sunset" and the prequel "Some Prequel"')
|
454
|
+
movie = Movie.find_by_title!('Before Sunset')
|
455
|
+
prequel = Movie.find_by_title!('Before Sunrise')
|
456
|
+
movie.prequel.should == prequel
|
457
|
+
end
|
458
|
+
|
437
459
|
it "should allow single quote for attribute values" do
|
438
460
|
MachinistModel.should_receive(:make).with({ :attribute => "foo"})
|
439
461
|
invoke_cucumber_step("there is a machinist model with the attribute 'foo'")
|
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: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|