Commit 6c44ffc8 authored by Mark Lapierre's avatar Mark Lapierre Committed by Dan Davison

Set screenshot in after instead of around hook

This will hopefully avoid nested examples
parent 616db62b
...@@ -51,9 +51,7 @@ module QA ...@@ -51,9 +51,7 @@ module QA
metadata[:type] = :feature metadata[:type] = :feature
end end
config.around(:each) do |example| config.append_after(:each) do |example|
example.run
if example.metadata[:screenshot] if example.metadata[:screenshot]
screenshot = example.metadata[:screenshot][:image] || example.metadata[:screenshot][:html] screenshot = example.metadata[:screenshot][:image] || example.metadata[:screenshot][:html]
example.metadata[:stdout] = %{[[ATTACHMENT|#{screenshot}]]} example.metadata[:stdout] = %{[[ATTACHMENT|#{screenshot}]]}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment