Skip to content

Instantly share code, notes, and snippets.

@lauer
Created January 9, 2020 08:42
Show Gist options
  • Save lauer/4a6c35746d97ae9a16493398d5fa373c to your computer and use it in GitHub Desktop.
Save lauer/4a6c35746d97ae9a16493398d5fa373c to your computer and use it in GitHub Desktop.
Solve problems with prepend and alias
# Note: cucumber-rails redefines the call method in ShowExceptions, leading to an infinite loop
# To make our tests work until that is properly fixed, we redefine call to the original method here
require 'action_dispatch'
module ActionDispatch
class ShowExceptions
alias original_call call
end
end
require 'cucumber/rails'
module ActionDispatch
class ShowExceptions
def call(env)
original_call(env)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment