Fix syntax for ruby compatibility
This commit is contained in:
parent
fb119f6ff8
commit
89bee3cf65
|
@ -95,9 +95,7 @@ class Capybara::Driver::Webkit
|
|||
end
|
||||
|
||||
def get_cookies
|
||||
command("GetCookies").lines
|
||||
.map { |line| line.strip }
|
||||
.select { |line| !line.empty? }
|
||||
command("GetCookies").lines.map{ |line| line.strip }.select{ |line| !line.empty? }
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -931,8 +931,7 @@ describe Capybara::Driver::Webkit do
|
|||
|
||||
cookies.size.should == 1
|
||||
|
||||
cookie = Hash[cookies[0].split(/\s*;\s*/)
|
||||
.map { |x| x.split("=", 2) }]
|
||||
cookie = Hash[cookies[0].split(/\s*;\s*/).map { |x| x.split("=", 2) }]
|
||||
cookie["cookie"].should == "abc"
|
||||
cookie["domain"].should include "127.0.0.1"
|
||||
cookie["path"].should == "/"
|
||||
|
|
Loading…
Reference in New Issue