Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Minitest Helper for Capybara-based pen-tests
require 'minitest/autorun'
require 'pry-rescue/minitest'
require 'capybara'
require 'capybara/dsl'
require 'capybara/poltergeist'
require 'minitest/colorize'
Capybara.register_driver :poltergeist do |app|
# to enable proxy support: Capybara::Poltergeist::Driver.new(app, js_errors: false, phantomjs_options: ["--proxy=12.13.14.15:4521"])
Capybara::Poltergeist::Driver.new(app, js_errors: false)
end
# Capybara and poltergeist configuration
Capybara.default_driver = :poltergeist
Capybara.run_server = false
module PenTest
class TestCase < MiniTest::Unit::TestCase
include Capybara::DSL
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.