From d91e965442ffc73448e73a86a23c508bfe701486 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 22 Aug 2012 11:47:33 -0400 Subject: [PATCH] start driver support --- lib/cuke-pack/drivers.rb | 6 ++++++ lib/cuke-pack/drivers/firefox.rb | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 lib/cuke-pack/drivers.rb create mode 100644 lib/cuke-pack/drivers/firefox.rb diff --git a/lib/cuke-pack/drivers.rb b/lib/cuke-pack/drivers.rb new file mode 100644 index 0000000..efe4d21 --- /dev/null +++ b/lib/cuke-pack/drivers.rb @@ -0,0 +1,6 @@ +Before do + if ENV['DRIVER'] + Capybara.current_driver = ENV['DRIVER'].to_sym + end +end + diff --git a/lib/cuke-pack/drivers/firefox.rb b/lib/cuke-pack/drivers/firefox.rb new file mode 100644 index 0000000..bdd3420 --- /dev/null +++ b/lib/cuke-pack/drivers/firefox.rb @@ -0,0 +1,6 @@ +require 'cuke-pack/drivers' + +Capybara.register_driver :firefox do |app| + Capybara::Selenium::Driver.new(app, :browser => :firefox) +end +