turnip 1.3.0 → 1.3.1

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: 9ea3b0858fb792b2cf0156c7732d0f8129f019a7
4
- data.tar.gz: 2438143523d14084f3f136353552efd8cc48f28e
3
+ metadata.gz: f374c37f9f2fcb45274efc7e2cebfb164a2afbca
4
+ data.tar.gz: b99dc0745a12e0cf34dd7883ddd162bfbac073cd
5
5
  SHA512:
6
- metadata.gz: a98490d1bfcbe5fc160866bc954764293aeaccebb93c03ca5987c2c0b6dd806359cfcbf15364bc26afac8fb2af0ce218133bffbe2190ce78fc24cf46637016b6
7
- data.tar.gz: 8ff4e5e87f5223706d644b275d17610965b8f3734415552c3566cb4919fd9756f66489062a07733b9efcae8b6c88e7f4a16e3e3124da4182f9c9766d5423bdcd
6
+ metadata.gz: af3a06dd948d386dde7c022297c7f60fcff8a137548bc64edb2a521576b2b7a8fb294d99f81c4ac734116112c3cd4b35692836d782df477bb918bc4cea49c255
7
+ data.tar.gz: 024480e1a6fbe196f41f55f76b70bab698219f30d336f374c7b0e2224f14005f1c3d2ce13c6f8eb568bbad2af59440d7b669b23205e9d6899e7d6a0b3d0a2180
data/.travis.yml CHANGED
@@ -3,6 +3,10 @@ language: ruby
3
3
  sudo: false
4
4
  cache: bundler
5
5
 
6
+ branches:
7
+ only:
8
+ - master
9
+
6
10
  matrix:
7
11
  allow_failures:
8
12
  - gemfile: Gemfile
@@ -20,3 +24,4 @@ gemfile:
20
24
  - gemfiles/Gemfile-rspec-3.0.x
21
25
  - gemfiles/Gemfile-rspec-3.1.x
22
26
  - gemfiles/Gemfile-rspec-3.2.x
27
+ - gemfiles/Gemfile-rspec-3.3.x
@@ -0,0 +1,6 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in turnip.gemspec
4
+ gemspec :path => '..'
5
+
6
+ gem 'rspec', '~> 3.3.0'
data/lib/turnip/rspec.rb CHANGED
@@ -78,27 +78,31 @@ module Turnip
78
78
 
79
79
  def run(feature_file)
80
80
  Turnip::Builder.build(feature_file).features.each do |feature|
81
- ::RSpec.describe feature.name, feature.metadata_hash do
82
- before do
83
- example = Turnip::RSpec.fetch_current_example(self)
84
- # This is kind of a hack, but it will make RSpec throw way nicer exceptions
85
- example.metadata[:file_path] ||= feature_file
86
-
87
- feature.backgrounds.map(&:steps).flatten.each do |step|
88
- run_step(feature_file, step)
89
- end
90
- end
91
- feature.scenarios.each do |scenario|
92
- instance_eval <<-EOS, feature_file, scenario.line
93
- describe scenario.name, scenario.metadata_hash do it(scenario.steps.map(&:to_s).join(' -> ')) do
94
- scenario.steps.each do |step|
95
- run_step(feature_file, step)
96
- end
97
- end
81
+ instance_eval <<-EOS, feature_file, feature.line
82
+ describe = ::RSpec.describe feature.name, feature.metadata_hash
83
+ run_feature(describe, feature, feature_file)
84
+ EOS
85
+ end
86
+ end
87
+
88
+ private
89
+
90
+ def run_feature(describe, feature, filename)
91
+ describe.before do
92
+ feature.backgrounds.map(&:steps).flatten.each do |step|
93
+ run_step(filename, step)
94
+ end
95
+ end
96
+
97
+ feature.scenarios.each do |scenario|
98
+ instance_eval <<-EOS, filename, scenario.line
99
+ describe.describe scenario.name, scenario.metadata_hash do it(scenario.steps.map(&:to_s).join(' -> ')) do
100
+ scenario.steps.each do |step|
101
+ run_step(filename, step)
98
102
  end
99
- EOS
103
+ end
100
104
  end
101
- end
105
+ EOS
102
106
  end
103
107
  end
104
108
  end
@@ -1,3 +1,3 @@
1
1
  module Turnip
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
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: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -118,6 +118,7 @@ files:
118
118
  - gemfiles/Gemfile-rspec-3.0.x
119
119
  - gemfiles/Gemfile-rspec-3.1.x
120
120
  - gemfiles/Gemfile-rspec-3.2.x
121
+ - gemfiles/Gemfile-rspec-3.3.x
121
122
  - lib/turnip.rb
122
123
  - lib/turnip/builder.rb
123
124
  - lib/turnip/capybara.rb
@@ -157,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
158
  version: '0'
158
159
  requirements: []
159
160
  rubyforge_project: turnip
160
- rubygems_version: 2.2.2
161
+ rubygems_version: 2.4.5
161
162
  signing_key:
162
163
  specification_version: 4
163
164
  summary: Gherkin extension for RSpec