Skip to content

Commit

Permalink
Account for Scenario Outlines in feature hooks
Browse files Browse the repository at this point in the history
Should address #21
  • Loading branch information
stewart committed Oct 10, 2013
1 parent 0a0fb7c commit edd5da0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/gitnesse/hooks.rb
Expand Up @@ -31,10 +31,18 @@ def self.append_results(scenario)
Gitnesse::ConfigLoader.find_and_load
dir = Gitnesse::DirManager.project_dir

file = scenario.file.gsub(/^#{@config.features_dir}\//, '')
if scenario.respond_to?(:scenario_outline)
file = scenario.scenario_outline.file.gsub(/^#{@config.features_dir}\//, '')
name = scenario.name.split("|")
name.shift
name = name.map! { |s| s.strip.lstrip }
name = "#{scenario.scenario_outline.name} - (#{name.join(', ')})"
else
file = scenario.file.gsub(/^#{@config.features_dir}\//, '')
name = scenario.name
end

page = file.gsub("/", " > ")
name = scenario.name
status = scenario.status

@wiki = Gitnesse::Wiki.new(@config.repository_url, dir, clone: false)
Expand Down

0 comments on commit edd5da0

Please sign in to comment.