diff --git a/lib/capybara/rack_test/driver.rb b/lib/capybara/rack_test/driver.rb index 6bc150fa..a888b069 100644 --- a/lib/capybara/rack_test/driver.rb +++ b/lib/capybara/rack_test/driver.rb @@ -72,4 +72,5 @@ class Capybara::RackTest::Driver < Capybara::Driver::Base def post(*args, &block); browser.post(*args, &block); end def put(*args, &block); browser.put(*args, &block); end def delete(*args, &block); browser.delete(*args, &block); end + def header(key, value); browser.header(key, value); end end diff --git a/spec/capybara_spec.rb b/spec/capybara_spec.rb index 8b8ed39d..5dc3bbee 100644 --- a/spec/capybara_spec.rb +++ b/spec/capybara_spec.rb @@ -17,7 +17,7 @@ describe Capybara do describe '.register_driver' do it "should add a new driver" do Capybara.register_driver :schmoo do |app| - Capybara::Driver::RackTest.new(app) + Capybara::RackTest::Driver.new(app) end session = Capybara::Session.new(:schmoo, TestApp) session.visit('/')