rspec-gherkin 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c9bab3b667c903dfa4cf5449becaa7778099a1e
4
- data.tar.gz: fe2a11c885696386a5adcc938dde4204fb571266
3
+ metadata.gz: 3461d35c2fb708dea40be079ec92034a6e8d37a3
4
+ data.tar.gz: 4b0f639db14675897d399024659bc4f20d1173cb
5
5
  SHA512:
6
- metadata.gz: c0fda6e78aa39013889fdb409ec4810ecad15e3757952e0661cbccb7e60a04a8149fcebcc56c16d257fc299f9c2cdb6af20b48845e117b06fd26c250f8b8d0f6
7
- data.tar.gz: 871433b8d10a664de7be4147d9b4fdf4745508c9eb7aba85834cab997988d93326050cfbffe1bbda8ab946e3c335cf8b2d7601727c6728ea5a272b99ce46db47
6
+ metadata.gz: eec23e81aa2e22d5290f94683b5ae093a37d7fbeba203cb9ac9a8acef6234ac59e8cda24ec48fd4c8d875aef4d6c0615a07284677ac3b080dda4dc13a6b95c6c
7
+ data.tar.gz: 9a9ba437a155f4988402560bcce13b6c3482a78fc19e756cac290f5f8e449f8d8bfbd6fec882a1fd82e1007acb77adb06f582287ee7be9e8ae4065fc2d9cc731
data/.travis.yml CHANGED
@@ -1,5 +1,4 @@
1
1
  rvm:
2
- - 1.9.2
3
2
  - 1.9.3
4
3
  - ruby-head
5
4
  - rbx-19mode
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 matchinf feature has been tagged as `@updated`
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
@@ -1 +1,9 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ task :console do
4
+ require 'irb'
5
+ require 'irb/completion'
6
+ require 'rspec-gherkin'
7
+ ARGV.clear
8
+ IRB.start
9
+ end
@@ -1,4 +1,4 @@
1
- require "capybara/rspec" rescue nil
1
+ require "capybara/rspec"
2
2
 
3
3
  class << self
4
4
  def feature(name = nil, new_metadata = {}, &block)
@@ -1,3 +1,3 @@
1
1
  module RSpecGherkin
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -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", "~> 2.0"
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.0
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: 2013-10-08 00:00:00.000000000 Z
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.0.3
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