class Minitest::Reporters::ScreenshotReporter
Use with capybara integration tests
Attributes
count[RW]
Public Instance Methods
record(test)
click to toggle source
Calls superclass method
# File lib/minitest/reporters/screenshot_reporter.rb, line 15 def record(test) super if test.failure test_name = "#{test.class.name}-#{test.name}" screenshot_name = test.error? ? "ERROR-#{test_name}.png" : "FAILURE-#{test_name}.png" save_screenshot File.join('test/screenshots', "#{self.class.count}-#{screenshot_name}") self.class.count += 1 end end