Skip to content

Commit 44a878e

Browse files
committed
In CI, we can't open the .html files saved by capybara-screenshot, so puts page.html instead so we
can figure out why it failed
1 parent b9efad2 commit 44a878e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spec/support/capybara_screenshot.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
# RSpec 3 no longer defines `example`, but passes the example as block argument instead
1010
example = config.respond_to?(:expose_current_running_example_as) ? example_from_block_arg : self.example
1111

12+
if example.exception && ENV['CI']
13+
puts page.html
14+
end
1215
Capybara::Screenshot::RSpec.after_failed_example(example)
1316
end
1417
end

0 commit comments

Comments
 (0)