Sha256: 49d9e7d2439fb9231d1ed7420d8aa13cdaca247576c4b7a29a01f6bbdc8cf32e

Contents?: true

Size: 610 Bytes

Versions: 2

Compression:

Stored size: 610 Bytes

Contents

require 'capybara'
module IntegrationTest
  include Capybara::DSL

  def setup
    super
    %x[rm -rf test/dummy_rails/tmp/cache]
  end

  def teardown
    super
    Capybara.reset_sessions!
    Capybara.use_default_driver
  end

  def screenshot!
    screenshot_dir = File.expand_path('../../tmp/', File.dirname(__FILE__))
    page.driver.render(File.join(screenshot_dir, "#{name}.png"), :full => true)
    source = page.evaluate_script("document.getElementsByTagName('html')[0].outerHTML") rescue nil
    File.open(File.join(screenshot_dir, "#{name}.html"), 'w') { |f| f.write(source) } if source
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
bootstrap-sass-3.2.0.4 test/support/integration_test.rb
bootstrap-sass-backport-3.2.0.2 test/support/integration_test.rb