Sha256: a4c22c7d5982be7c98abdddc765addd62a5ded838a498b0e7cea7f57fdaae4a5
Contents?: true
Size: 637 Bytes
Versions: 1
Compression:
Stored size: 637 Bytes
Contents
require "capybara" require "launchy" require "capybara/full_screenshot/version" require "capybara/full_screenshot/rspec_helpers" module Capybara module FullScreenshot module_function def storage_directory return Rails.root.join('tmp', 'capybara') if defined?(Rails) File.expand_path('./') end def screenshot_path File.join(storage_directory, unique_filename) end def unique_filename "full-page-screenshot-#{ Time.now.to_i }.png" end end end if defined?(RSpec) RSpec.configure do |config| config.include Capybara::FullScreenshot::RSpecHelpers, type: :feature end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capybara-full_screenshot-0.1.0 | lib/capybara/full_screenshot.rb |