From 41653a4ab3f3de88f428e45c1e3c7b10cda07cfb Mon Sep 17 00:00:00 2001 From: Wataru MIYAGUNI Date: Tue, 22 Nov 2016 04:51:08 +0900 Subject: [PATCH] Occur error when blank feature see: https://github.com/jnicklas/turnip/pull/188 --- lib/turnip_formatter/ext/turnip/rspec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/turnip_formatter/ext/turnip/rspec.rb b/lib/turnip_formatter/ext/turnip/rspec.rb index a8917da..dd23937 100644 --- a/lib/turnip_formatter/ext/turnip/rspec.rb +++ b/lib/turnip_formatter/ext/turnip/rspec.rb @@ -11,6 +11,8 @@ def run(feature_file) original_run(feature_file) feature = Turnip::Builder.build(feature_file) + return nil if feature.nil? + example_group = ::RSpec.world.example_groups.last update_metadata(feature, example_group)