Skip to content

Commit

Permalink
added reset! method and cookie support for driver
Browse files Browse the repository at this point in the history
Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
boblail authored and josevalim committed Jan 9, 2011
1 parent 72452bd commit 4cdc734
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/capybara/driver/zombie_driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ def find(selector, context=nil)
decode(ids).map { |n| Node.new(self, n) }
end

def reset!
socket_write("browser.cookies(browser.window.location.hostname, '/').clear();")
end

private

def url(path)
Expand Down
2 changes: 1 addition & 1 deletion spec/driver/zombie_driver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
it_should_behave_like "driver"
it_should_behave_like "driver with header support"
it_should_behave_like "driver with status code support"
# it_should_behave_like "driver with cookies support"
it_should_behave_like "driver with cookies support"
# it_should_behave_like "driver with infinite redirect detection"
# it_should_behave_like "driver with javascript support"
# it_should_behave_like "driver with frame support"
Expand Down

0 comments on commit 4cdc734

Please sign in to comment.