Skip to content

Commit

Permalink
Fixes when parsing empty features
Browse files Browse the repository at this point in the history
When documents contain no features it would cause an error when processing the features
  • Loading branch information
Franklin Webber committed Dec 6, 2016
1 parent e2daff6 commit db7bbcb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/cucumber/city_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def find_or_create_tag(tag_name,parent)
def feature(document)
#log.debug "FEATURE"
feature = document[:feature]
return unless document[:feature]
return if has_exclude_tags?(feature[:tags].map { |t| t[:name].gsub(/^@/, '') })

@feature = YARD::CodeObjects::Cucumber::Feature.new(@namespace,File.basename(@file.gsub('.feature','').gsub('.','_'))) do |f|
Expand Down

0 comments on commit db7bbcb

Please sign in to comment.