Skip to content

Commit

Permalink
Merge pull request #70 from gongo/support_3.0.0-beta4
Browse files Browse the repository at this point in the history
Support turnip_3.0.0-beta.4
  • Loading branch information
gongo committed Oct 13, 2016
2 parents 249409e + 5c7f9c1 commit 237dcff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/turnip_formatter/ext/turnip/rspec.rb
Expand Up @@ -8,16 +8,16 @@ class << self
alias_method :original_run, :run

def run(feature_file)
features = original_run(feature_file)
example_groups = ::RSpec.world.example_groups[-features.length..-1]
original_run(feature_file)

features.zip(example_groups).each do |feature, example_group|
update_metadata(feature, example_group)
end
feature = Turnip::Builder.build(feature_file)
example_group = ::RSpec.world.example_groups.last

update_metadata(feature, example_group)
end

#
# @param [Turnip::Builder::Feature] feature
# @param [Turnip::Node::Feature] feature
# @param [RSpec::Core::ExampleGroup] example_group
#
def update_metadata(feature, example_group)
Expand Down
2 changes: 1 addition & 1 deletion test/helper.rb
Expand Up @@ -25,7 +25,7 @@ def sample_feature
return @@sample_feature if @@sample_feature

filename = File.expand_path('./sample.feature', File.dirname(__FILE__))
@@sample_feature = Turnip::Builder.build(filename).features[0]
@@sample_feature = Turnip::Builder.build(filename)
end
end
end
2 changes: 1 addition & 1 deletion turnip_formatter.gemspec
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^spec/})
spec.require_paths = ['lib']

spec.add_dependency 'turnip', '~> 3.0.0.pre.beta'
spec.add_dependency 'turnip', '~> 3.0.0.pre.beta.4'
spec.add_dependency 'slim'
spec.add_dependency 'tilt'
spec.add_dependency 'rspec', [">=3.0", "<3.5"]
Expand Down

0 comments on commit 237dcff

Please sign in to comment.