lib/testrail.rb in gridium-1.1.39 vs lib/testrail.rb in gridium-1.1.42
- old
+ new
@@ -63,16 +63,20 @@
if rspec_test.exception
status = CONFIG[:fail]
message = rspec_test.exception.message
screenshot_url = rspec_test.metadata[:screenshot_url]
if screenshot_url
- message << "\n - Screenshot: #{screenshot_url}"
+ message << "\n - Screenshot: #{screenshot_url}\n"
end
# add backtrace to test case
bt_search_re = rspec_test.metadata[:backtrace_regex] || 'sitetestui'
bt = rspec_test.exception.backtrace.grep(/#{bt_search_re}/)
- message << "\n\n # " + bt.join("\n # ") unless bt.empty?
+ message << "\n\n -> " + bt.join("\n -> ") unless bt.empty?
+
+ # replace rspec backtick (`): special formatting for TestRail
+ # http://docs.gurock.com/testrail-userguide/userguide-editor
+ message.gsub!('`', "'")
else
status = CONFIG[:pass]
message = 'Test Passed.'
end