turnip 4.2.0 → 4.3.0
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/.github/workflows/test.yml +1 -2
- data/CHANGELOG.md +90 -0
- data/README.md +0 -1
- data/examples/scenario_outline_scenario_name_substitution.feature +13 -0
- data/gemfiles/{Gemfile-rspec-3.7.x → Gemfile-rspec-3.10.x} +1 -1
- data/lib/turnip/node/scenario_outline.rb +3 -2
- data/lib/turnip/version.rb +1 -1
- data/spec/builder_spec.rb +12 -0
- data/spec/integration_spec.rb +1 -1
- metadata +5 -5
- data/.travis.yml +0 -19
- data/gemfiles/Gemfile-rspec-3.8.x +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a5b2f61d3782f307c76f247b14f6a814c9b23e756ed5a1ebdb2d5f1261454af
|
4
|
+
data.tar.gz: d4d5876e9b484995c2883448e4b302d68ec14094e52dde6d78c5b99232d801a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b433ce756fb3c6430c1544e9b94acf5a36ad5de1607ad71824961be0fa313907f2d05f1cb55102d424935a8f311cd99045c0d6bec039edb997f51418fab6b9d
|
7
|
+
data.tar.gz: c30109444ccc7b315b98db85a4f24bbd31082289d35a4a6930d8c657adcc278e6bd8d1420082d6061a8f61fe10cae461a8d6e56a6ea0347eb9917d9e110ab1ce
|
data/.github/workflows/test.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
# CHANGE LOG
|
2
|
+
|
3
|
+
## [Unreleased]
|
4
|
+
|
5
|
+
## [4.3.0] - 2021-05-16
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- Support scenario name substitution [[GH-237](https://github.com/jnicklas/turnip/pull/237)]
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
|
13
|
+
- Support RSpec 3.9 and 3.10 (drop 3.7 and 3.8) [[GH-238](https://github.com/jnicklas/turnip/pull/238)]
|
14
|
+
- Replace TravisCI with GitHub Workflows [[GH-239](https://github.com/jnicklas/turnip/pull/239)]
|
15
|
+
|
16
|
+
## [4.2.0] - 2020-09-02
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
|
20
|
+
- Update gherkin version
|
21
|
+
- v11 [[GH-222](https://github.com/jnicklas/turnip/pull/222)]
|
22
|
+
- v12 [[GH-224](https://github.com/jnicklas/turnip/pull/224)]
|
23
|
+
- v14 [[GH-229](https://github.com/jnicklas/turnip/pull/229)]
|
24
|
+
|
25
|
+
### Fixed
|
26
|
+
|
27
|
+
- Test against Ruby 2.7 [[GH-223](https://github.com/jnicklas/turnip/pull/223)]
|
28
|
+
- Drop support Ruby 2.3 and 2.4 [[GH-225](https://github.com/jnicklas/turnip/pull/225)]
|
29
|
+
- Update travis.yml [[GH-226](https://github.com/jnicklas/turnip/pull/226)]]
|
30
|
+
- Setup GitHub Actions [[GH-227](https://github.com/jnicklas/turnip/pull/227)]
|
31
|
+
- Suppress deprecation warning in Capybara 3.33.0 [[GH-232](https://github.com/jnicklas/turnip/pull/232)]
|
32
|
+
|
33
|
+
## [4.1.0] - 2020-03-02
|
34
|
+
|
35
|
+
### Added
|
36
|
+
|
37
|
+
- Warn when replacing placeholders [[GH-219](https://github.com/jnicklas/turnip/pull/219))
|
38
|
+
|
39
|
+
### Changed
|
40
|
+
|
41
|
+
- Update gherkin version
|
42
|
+
- v8 [[GH-217](https://github.com/jnicklas/turnip/pull/217)]
|
43
|
+
- v9 [[GH-218](https://github.com/jnicklas/turnip/pull/218)]
|
44
|
+
- v10 [[GH-221](https://github.com/jnicklas/turnip/pull/221)]
|
45
|
+
|
46
|
+
### Fixed
|
47
|
+
|
48
|
+
- Update README.md [[GH-216](https://github.com/jnicklas/turnip/pull/216)]
|
49
|
+
|
50
|
+
## [4.0.1] - 2019-04-22
|
51
|
+
|
52
|
+
### Changed
|
53
|
+
|
54
|
+
- Add `required_ruby_version` [[GH-212](https://github.com/jnicklas/turnip/pull/212)]
|
55
|
+
- Add support Ruby 2.6 by upgrading Gherkin version [[GH-214](https://github.com/jnicklas/turnip/pull/214)]
|
56
|
+
|
57
|
+
### Fixed
|
58
|
+
|
59
|
+
- Update README.md [[GH-211](https://github.com/jnicklas/turnip/pull/211)]
|
60
|
+
- Add homepage url to gemspec [[GH-209](https://github.com/jnicklas/turnip/pull/209)]
|
61
|
+
|
62
|
+
## [4.0.0] - 2019-02-28
|
63
|
+
|
64
|
+
### Changed
|
65
|
+
|
66
|
+
- Use Gherkin 6.0 [[GH-206](https://github.com/jnicklas/turnip/pull/206)] [[GH-208](https://github.com/jnicklas/turnip/pull/208)]
|
67
|
+
- Support RSpec 3.7 and 3.8 (drop 3.6) [[GH-203](https://github.com/jnicklas/turnip/pull/203)]
|
68
|
+
- Drop support Ruby 2.2 [[GH-204](https://github.com/jnicklas/turnip/pull/204)]
|
69
|
+
|
70
|
+
### Fixed
|
71
|
+
|
72
|
+
- Test against Ruby 2.6 (fail yet) [[GH-207](https://github.com/jnicklas/turnip/pull/207)]
|
73
|
+
|
74
|
+
## [3.1.0] - 2018-01-30
|
75
|
+
|
76
|
+
### Changed
|
77
|
+
|
78
|
+
- Use Gherkin 5.0 [[GH-200](https://github.com/jnicklas/turnip/pull/200)]
|
79
|
+
- Support Ruby 2.5.0 [[GH-201](https://github.com/jnicklas/turnip/pull/201)]
|
80
|
+
- Drop support Ruby 2.1 [[GH-191](https://github.com/jnicklas/turnip/pull/191)]
|
81
|
+
- Support RSpec 3.7.0 and 3.6.0 [[GH-197](https://github.com/jnicklas/turnip/pull/197)]
|
82
|
+
|
83
|
+
## Fixed
|
84
|
+
|
85
|
+
- Add license to gemspec [[GH-193](https://github.com/jnicklas/turnip/pull/193)]
|
86
|
+
- Suppress warning [[GH-195](https://github.com/jnicklas/turnip/pull/195)]
|
87
|
+
|
88
|
+
## [3.0.0] - 2017-04-04
|
89
|
+
|
90
|
+
TBD (You can see https://github.com/jnicklas/turnip/releases for before this bersion)
|
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
[](https://gitter.im/jnicklas/turnip?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
4
4
|
|
5
|
-
[](http://travis-ci.org/jnicklas/turnip)
|
6
5
|

|
7
6
|
[](https://codeclimate.com/github/jnicklas/turnip)
|
8
7
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Feature: using scenario outlines
|
2
|
+
Scenario Outline: a monster introduced himself as <name>
|
3
|
+
Given there is a monster called <name>
|
4
|
+
Then the monster introduced himself:
|
5
|
+
"""
|
6
|
+
Ahhhhhhh! i'm <name>!
|
7
|
+
"""
|
8
|
+
|
9
|
+
Examples:
|
10
|
+
| name |
|
11
|
+
| John |
|
12
|
+
| "John Smith" |
|
13
|
+
| "O'Flannahan" |
|
@@ -57,7 +57,7 @@ module Turnip
|
|
57
57
|
header = example.header
|
58
58
|
|
59
59
|
example.rows.map do |row|
|
60
|
-
metadata = convert_metadata_to_scenario
|
60
|
+
metadata = convert_metadata_to_scenario(header, row)
|
61
61
|
|
62
62
|
#
|
63
63
|
# Replace <placeholder> using Example values
|
@@ -115,10 +115,11 @@ module Turnip
|
|
115
115
|
# @todo :keyword is not considered a language (en only)
|
116
116
|
# @return [Hash]
|
117
117
|
#
|
118
|
-
def convert_metadata_to_scenario()
|
118
|
+
def convert_metadata_to_scenario(header, row)
|
119
119
|
# deep copy
|
120
120
|
Marshal.load(Marshal.dump(raw)).tap do |new_raw|
|
121
121
|
new_raw.delete(:examples)
|
122
|
+
new_raw[:name] = substitute(new_raw[:name], header, row)
|
122
123
|
new_raw[:type] = :Scenario
|
123
124
|
new_raw[:keyword] = 'Scenario'
|
124
125
|
end
|
data/lib/turnip/version.rb
CHANGED
data/spec/builder_spec.rb
CHANGED
@@ -75,6 +75,18 @@ describe Turnip::Builder do
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
+
context "with example scenario name in scenario outlines" do
|
79
|
+
let(:feature_file) { File.expand_path('../examples/scenario_outline_scenario_name_substitution.feature', File.dirname(__FILE__)) }
|
80
|
+
|
81
|
+
it "replaces placeholders in scenario name" do
|
82
|
+
feature.scenarios.map(&:name).should eq([
|
83
|
+
"a monster introduced himself as John",
|
84
|
+
'a monster introduced himself as "John Smith"',
|
85
|
+
%(a monster introduced himself as "O'Flannahan")
|
86
|
+
])
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
78
90
|
context "with example tables in scenario outlines" do
|
79
91
|
let(:feature_file) { File.expand_path('../examples/scenario_outline_table_substitution.feature', File.dirname(__FILE__)) }
|
80
92
|
|
data/spec/integration_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe 'The CLI', :type => :integration do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it "prints out failures and successes" do
|
15
|
-
@result.should include('
|
15
|
+
@result.should include('45 examples, 4 failures, 5 pending')
|
16
16
|
end
|
17
17
|
|
18
18
|
it "includes features in backtraces" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turnip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Nicklas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -97,7 +97,7 @@ files:
|
|
97
97
|
- ".github/workflows/test.yml"
|
98
98
|
- ".gitignore"
|
99
99
|
- ".rspec"
|
100
|
-
-
|
100
|
+
- CHANGELOG.md
|
101
101
|
- Gemfile
|
102
102
|
- README.md
|
103
103
|
- Rakefile
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- examples/pending.feature
|
113
113
|
- examples/scenario_outline.feature
|
114
114
|
- examples/scenario_outline_multiline_string_substitution.feature
|
115
|
+
- examples/scenario_outline_scenario_name_substitution.feature
|
115
116
|
- examples/scenario_outline_table_substitution.feature
|
116
117
|
- examples/simple_feature.feature
|
117
118
|
- examples/step_calling.feature
|
@@ -130,8 +131,7 @@ files:
|
|
130
131
|
- examples/tags.feature
|
131
132
|
- examples/with_backticks.feature
|
132
133
|
- examples/with_comments.feature
|
133
|
-
- gemfiles/Gemfile-rspec-3.
|
134
|
-
- gemfiles/Gemfile-rspec-3.8.x
|
134
|
+
- gemfiles/Gemfile-rspec-3.10.x
|
135
135
|
- gemfiles/Gemfile-rspec-3.9.x
|
136
136
|
- lib/turnip.rb
|
137
137
|
- lib/turnip/builder.rb
|
data/.travis.yml
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
sudo: false
|
4
|
-
cache: bundler
|
5
|
-
|
6
|
-
branches:
|
7
|
-
only:
|
8
|
-
- master
|
9
|
-
|
10
|
-
rvm:
|
11
|
-
- 2.5.8
|
12
|
-
- 2.6.6
|
13
|
-
- 2.7.1
|
14
|
-
- jruby
|
15
|
-
|
16
|
-
gemfile:
|
17
|
-
- gemfiles/Gemfile-rspec-3.7.x
|
18
|
-
- gemfiles/Gemfile-rspec-3.8.x
|
19
|
-
- gemfiles/Gemfile-rspec-3.9.x
|