Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
Fix syntax for ruby compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
halogenandtoast committed Sep 30, 2011
1 parent fb119f6 commit 89bee3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions lib/capybara/driver/webkit/browser.rb
Expand Up @@ -95,9 +95,7 @@ def clear_cookies
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
Expand Down
3 changes: 1 addition & 2 deletions spec/driver_spec.rb
Expand Up @@ -931,8 +931,7 @@ def echoed_cookie

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 == "/"
Expand Down

0 comments on commit 89bee3c

Please sign in to comment.