Permalink
Browse files

Revise test result annotation format

  • Loading branch information...
1 parent 1d245a5 commit 3b51d131f475bbbef9cf4f05ffb3c6dd32ab8129 @stewart stewart committed Dec 5, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/gitnesse/wiki.rb
View
4 lib/gitnesse/wiki.rb
@@ -108,7 +108,7 @@ def remove_past_results
def strip_results(content)
if content.match(/\u0060{3}gherkin.*\u0060{3}(.*)/m)[1]
[ "FAILED", "PASSED", "PENDING", "UNDEFINED" ].each do |type|
- content.gsub!(/#{type}: .*\n*/, '')
+ content.gsub!(/\n*\`Last result was #{type}: .*\n*/, '')
end
end
content
@@ -128,7 +128,7 @@ def append_results(scenario)
if page.name == filename || page.name == "#{filename}.feature"
if page.text_data.include? scenario.name
content = page.raw_data
- string = "\n#{scenario.status.to_s.upcase}: #{scenario.name}\n"
+ string = "\n\`Last result was #{scenario.status.to_s.upcase}: #{scenario.name} (#{Time.now.to_s} - #{Gitnesse.configuration.info})\`\n"
content.gsub(string, '')
content << string
@wiki.update_page(page, page.name, :markdown, content, @commit_info)

0 comments on commit 3b51d13

Please sign in to comment.