Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Monkey-patch Capybara to not reset sessions after each example

View monkeypath_capybara.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
 
# Don't let capybara reset sessions
# See : https://github.com/jnicklas/capybara/blob/master/lib/capybara/rspec.rb#L16
module Capybara
class << self
alias_method :old_reset_sessions!, :reset_sessions!
def reset_sessions!; end
end
end
 
# Reset sessions again.
module Capybara
class << self
alias_method :reset_sessions!, :old_reset_sessions!
remove_method :old_reset_sessions!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.