mirror of
https://github.com/twbs/bootstrap-sass.git
synced 2022-11-09 12:27:02 -05:00
22 lines
448 B
Ruby
22 lines
448 B
Ruby
require 'capybara/dsl'
|
|
require 'fileutils'
|
|
module DummyRailsIntegration
|
|
include Capybara::DSL
|
|
|
|
def setup
|
|
super
|
|
FileUtils.rm_rf('test/dummy_rails/tmp/cache', secure: true)
|
|
end
|
|
|
|
def teardown
|
|
super
|
|
Capybara.reset_sessions!
|
|
Capybara.use_default_driver
|
|
end
|
|
|
|
def screenshot!
|
|
path = "tmp/#{name}.png"
|
|
page.driver.render(File.join(GEM_PATH, path), full: true)
|
|
STDERR.puts "Screenshot saved to #{path}"
|
|
end
|
|
end
|