rspec-gherkin 0.1.0 → 0.1.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 +4 -4
- data/.travis.yml +0 -1
- data/README.md +31 -1
- data/Rakefile +8 -0
- data/lib/rspec-gherkin/rspec-dsl.rb +1 -1
- data/lib/rspec-gherkin/version.rb +1 -1
- data/rspec-gherkin.gemspec +2 -1
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3461d35c2fb708dea40be079ec92034a6e8d37a3
|
4
|
+
data.tar.gz: 4b0f639db14675897d399024659bc4f20d1173cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eec23e81aa2e22d5290f94683b5ae093a37d7fbeba203cb9ac9a8acef6234ac59e8cda24ec48fd4c8d875aef4d6c0615a07284677ac3b080dda4dc13a6b95c6c
|
7
|
+
data.tar.gz: 9a9ba437a155f4988402560bcce13b6c3482a78fc19e756cac290f5f8e449f8d8bfbd6fec882a1fd82e1007acb77adb06f582287ee7be9e8ae4065fc2d9cc731
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -89,6 +89,35 @@ rspec spec/features/manage_articles_spec.rb
|
|
89
89
|
You may want to add `--tag ~feature` to your `.rspec` file to not run
|
90
90
|
slow features specs by default.
|
91
91
|
|
92
|
+
## Scenario outline
|
93
|
+
|
94
|
+
RSpec Gherkin has also support for Scenario Outlines.
|
95
|
+
Just add additional params to your scenario.
|
96
|
+
|
97
|
+
```
|
98
|
+
Feature: using scenario outlines
|
99
|
+
Scenario Outline: a simple outline
|
100
|
+
Given there is a monster with <hp> hitpoints
|
101
|
+
When I attack the monster and do <damage> points damage
|
102
|
+
Then the monster should be <state>
|
103
|
+
|
104
|
+
Examples:
|
105
|
+
| hp | damage | state | happy |
|
106
|
+
| 10.0 | 13 | dead | false |
|
107
|
+
| 8.0 | 5 | alive | true |
|
108
|
+
```
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
feature 'using scenario outlines' do
|
112
|
+
scenario 'a simple outline' do |hp, damage, state, happy|
|
113
|
+
expect(hp).to be_a(Float)
|
114
|
+
expect(damage).to be_a(Fixnum)
|
115
|
+
expect(state).to be_a(String)
|
116
|
+
expect([true, false]).to include happy
|
117
|
+
end
|
118
|
+
end
|
119
|
+
```
|
120
|
+
|
92
121
|
## Configuration
|
93
122
|
|
94
123
|
By default features in `features` directory are mapped to specs in `spec/features`.
|
@@ -117,8 +146,9 @@ It is an extension to it. `rspec-gherin` among others:
|
|
117
146
|
2. Allows for running feature files directly
|
118
147
|
3. Notifies if any features/scenarios have pending specs
|
119
148
|
4. Notifies if any specs have no matching features/scenarios
|
120
|
-
5. Marks specs as pending if
|
149
|
+
5. Marks specs as pending if matching feature has been tagged as `@updated`
|
121
150
|
6. Provides RSpec messages, indicating location of feature and spec files.
|
151
|
+
7. Extracts examples from Scenario Outlines and passes them to specs.
|
122
152
|
|
123
153
|
## License
|
124
154
|
|
data/Rakefile
CHANGED
data/rspec-gherkin.gemspec
CHANGED
@@ -16,7 +16,8 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
17
|
s.require_paths = ["lib"]
|
18
18
|
|
19
|
-
s.add_runtime_dependency "rspec", "
|
19
|
+
s.add_runtime_dependency "rspec", ">= 2.0"
|
20
20
|
s.add_runtime_dependency "gherkin", ">= 2.5"
|
21
|
+
s.add_runtime_dependency "capybara", ">= 2.0"
|
21
22
|
s.add_development_dependency "rake"
|
22
23
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-gherkin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Stankiewicz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.5'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: capybara
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -105,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
119
|
version: '0'
|
106
120
|
requirements: []
|
107
121
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
122
|
+
rubygems_version: 2.2.1
|
109
123
|
signing_key:
|
110
124
|
specification_version: 4
|
111
125
|
summary: Different approach to Gherkin features in RSpec
|