Skip to content
Browse files

Add #server_host to driver

  • Loading branch information...
1 parent 7361822 commit 61da4eefca1b86a5ceeddce6f325ea6563ce7cba @mildavw committed Apr 6, 2012
Showing with 8 additions and 0 deletions.
  1. +4 −0 lib/capybara/driver/webkit.rb
  2. +4 −0 spec/integration/driver_spec.rb
View
4 lib/capybara/driver/webkit.rb
@@ -122,6 +122,10 @@ def server_port
@rack_server.port
end
+ def server_host
+ @rack_server.host
+ end
+
def cookies
@cookie_jar ||= CookieJar.new(browser)
end
View
4 spec/integration/driver_spec.rb
@@ -17,4 +17,8 @@
@driver.server_port.should eq(@driver.instance_variable_get(:@rack_server).port)
end
+ it "returns the rack server host" do
+ @driver.server_host.should eq(@driver.instance_variable_get(:@rack_server).host)
+ end
+
end

0 comments on commit 61da4ee

Please sign in to comment.
Something went wrong with that request. Please try again.