Skip to content

Commit

Permalink
Add #server_host to driver
Browse files Browse the repository at this point in the history
  • Loading branch information
mildavw committed Apr 6, 2012
1 parent 7361822 commit 61da4ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/capybara/driver/webkit.rb
Expand Up @@ -122,6 +122,10 @@ def server_port
@rack_server.port @rack_server.port
end end


def server_host
@rack_server.host
end

def cookies def cookies
@cookie_jar ||= CookieJar.new(browser) @cookie_jar ||= CookieJar.new(browser)
end end
Expand Down
4 changes: 4 additions & 0 deletions spec/integration/driver_spec.rb
Expand Up @@ -17,4 +17,8 @@
@driver.server_port.should eq(@driver.instance_variable_get(:@rack_server).port) @driver.server_port.should eq(@driver.instance_variable_get(:@rack_server).port)
end end


it "returns the rack server host" do
@driver.server_host.should eq(@driver.instance_variable_get(:@rack_server).host)
end

end end

0 comments on commit 61da4ee

Please sign in to comment.