mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Merge branch '2.6_stable'
* 2.6_stable: tagged 2.6.2 update history [ci skip] scope addressable make sure we work with addressable < 2.4.0 allow for more versions of addressable update history tagged 2.6.1 Require addressable gem in CurrentPathQuery fix typo in parameter name [ci skip]
This commit is contained in:
commit
3f5c36f1a4
3 changed files with 12 additions and 5 deletions
|
@ -1,8 +1,14 @@
|
|||
# Version 2.7.0
|
||||
Release date: unreleased
|
||||
|
||||
#Version 2.6.2
|
||||
Relase date: 2016-01-27
|
||||
|
||||
### Fixed
|
||||
* support for more than just addressable 2.4.0 [Thomas Walpole]
|
||||
|
||||
# Version 2.6.1
|
||||
Release data: 2016-01-27
|
||||
Release date: 2016-01-27
|
||||
|
||||
### Fixed
|
||||
* Add missing require for addressable [Jorge Bejar]
|
||||
|
|
|
@ -12,5 +12,6 @@ gem 'rspec', '= 2.2.0'
|
|||
gem 'cucumber', '= 0.10.5'
|
||||
gem 'tins', '= 1.6.0' # 1.7.0 requires ruby 2.0
|
||||
gem 'mime-types', '<3.0' # 3.0 require ruby 2.0
|
||||
gem 'addressable', '< 2.4.0' # 2.4.0 allows require 'addressable' previous don't
|
||||
# We cannot test against older versions of selenium-webdriver without
|
||||
# installing older compatible Firefox versions.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require 'addressable'
|
||||
require 'addressable/uri'
|
||||
|
||||
module Capybara
|
||||
# @api private
|
||||
|
@ -17,16 +17,16 @@ module Capybara
|
|||
session.current_url
|
||||
else
|
||||
if options[:only_path]
|
||||
Addressable::URI.parse(session.current_url).path
|
||||
::Addressable::URI.parse(session.current_url).path
|
||||
else
|
||||
Addressable::URI.parse(session.current_url).request_uri
|
||||
::Addressable::URI.parse(session.current_url).request_uri
|
||||
end
|
||||
end
|
||||
|
||||
if @expected_path.is_a? Regexp
|
||||
@actual_path.match(@expected_path)
|
||||
else
|
||||
Addressable::URI.parse(@expected_path) == Addressable::URI.parse(@actual_path)
|
||||
::Addressable::URI.parse(@expected_path) == Addressable::URI.parse(@actual_path)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue