1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Strip empty query string in current_url test

Some drivers (like WebKit) apparently do this. Suggested by
@jonleighton in #611.
This commit is contained in:
Jo Liss 2012-01-12 18:26:46 +01:00
parent 0209a2c721
commit be6c1a02c4

View file

@ -14,7 +14,7 @@ shared_examples_for "current_url" do
def should_be_on server_index, path="/host", scheme="http"
# Check that we are on /host on the given server
s = @servers[server_index]
@session.current_url.should == "#{scheme}://#{s.host}:#{s.port}#{path}"
@session.current_url.chomp('?').should == "#{scheme}://#{s.host}:#{s.port}#{path}"
@session.current_host.should == "#{scheme}://#{s.host}" # no port
@session.current_path.should == path
if path == '/host'