Created
June 18, 2012 02:34
-
-
Save rvandervort/2946500 to your computer and use it in GitHub Desktop.
Monkey-patch Capybara to not reset sessions after each example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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