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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 856fe1922e3b069b305e514911da87b4432acc34c89105b46cbf06d6cdd997be
4
- data.tar.gz: a0f9631996850758343f66f79d96d88a1cf0216c4df464a8132677d462766525
3
+ metadata.gz: '0018303b5e8f5bdbd4beed10437846c6b51ccb3a241e04f134784569ac44f70e'
4
+ data.tar.gz: 3d57005ccf8fc284ee73b00abbd8c05e0e2994d9b1640c6cbc1d2dc487faa711
5
5
  SHA512:
6
- metadata.gz: 31d7825ded3ed0ed9e9c29a490ecbff0028b710cb4f33bddbf1e3846a744444c9ae53a852b37db72284a57f4ef40515e166f8043dbf4d96db5412205a7f3b3c0
7
- data.tar.gz: 71ede7f9b7ae86335fb3eb1cd27ff9c72bd9ec9fbd958585fe4293443c7b6608b3cd0c21ea994971946ac69091722eb2a27714492d34a5e792583068c412b666
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cucumber_factory (2.0.0)
4
+ cucumber_factory (2.0.1)
5
5
  activerecord
6
6
  activesupport
7
7
  cucumber
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cucumber_factory (2.0.0)
4
+ cucumber_factory (2.0.1)
5
5
  activerecord
6
6
  activesupport
7
7
  cucumber
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cucumber_factory (2.0.0)
4
+ cucumber_factory (2.0.1)
5
5
  activerecord
6
6
  activesupport
7
7
  cucumber
@@ -41,7 +41,7 @@ module CucumberFactory
41
41
 
42
42
  NAMED_CREATION_STEP_DESCRIPTOR_WITH_TEXT_ATTRIBUTES = {
43
43
  :kind => :Given,
44
- :pattern => /^"#{NAMED_RECORD_PATTERN}#{ATTRIBUTES_PATTERN}#{TEXT_ATTRIBUTES_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
  }
@@ -1,3 +1,3 @@
1
1
  module CucumberFactory
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
@@ -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.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-10 00:00:00.000000000 Z
11
+ date: 2020-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber