Fix syntax for ruby compatibility

This commit is contained in:
Matthew Mongeau 2011-09-30 11:41:59 -04:00
parent fb119f6ff8
commit 89bee3cf65
2 changed files with 2 additions and 5 deletions

View File

@ -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

View File

@ -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 == "/"