module Capybara::Screenshot::RSpec::TextReporter

Public Instance Methods

dump_failure_info_with_screenshot(example) click to toggle source
# File lib/capybara-screenshot/rspec/text_reporter.rb, line 16
def dump_failure_info_with_screenshot(example)
  dump_failure_info_without_screenshot example
  output_screenshot_info(example)
end
example_failed_with_screenshot(notification) click to toggle source
# File lib/capybara-screenshot/rspec/text_reporter.rb, line 21
def example_failed_with_screenshot(notification)
  example_failed_without_screenshot notification
  output_screenshot_info(notification.example)
end

Private Instance Methods

long_padding() click to toggle source
# File lib/capybara-screenshot/rspec/text_reporter.rb, line 33
def long_padding
  "  "
end
output_screenshot_info(example) click to toggle source
# File lib/capybara-screenshot/rspec/text_reporter.rb, line 27
def output_screenshot_info(example)
  return unless (screenshot = example.metadata[:screenshot])
  output.puts(long_padding + CapybaraScreenshot::Helpers.yellow("HTML screenshot: #{screenshot[:html]}")) if screenshot[:html]
  output.puts(long_padding + CapybaraScreenshot::Helpers.yellow("Image screenshot: #{screenshot[:image]}")) if screenshot[:image]
end