Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure RSpec backtrace error reporting #965

Open
lancejjohnson opened this issue Feb 4, 2019 · 0 comments
Open

Configure RSpec backtrace error reporting #965

lancejjohnson opened this issue Feb 4, 2019 · 0 comments
Labels
Enhancement Features we're considering adding

Comments

@lancejjohnson
Copy link

Filter from the back trace commonly used gems during RSpec failure logging. Many framework gems are rarely relevant in tracing testing errors, particularly while doing TDD, and their presence in the failure log makes it more difficult to find the test error that is driving the next change.

For example,

GEMS_TO_EXCLUDE_FROM_BACKTRACE = %w[
  bootsnap
  capybara
  delayed_job
  factory_bot
  honeybadger
  rack
  railties
  shoulda-matchers
  skylight
  sprockets-rails
]

RSpec.configure do |config|
  config.filter_rails_from_backtrace!
  config.filter_gems_from_backtrace(*GEMS_TO_EXCLUDE_FROM_BACKTRACE)
end

RSpec allows developers to temporarily suspend this filtering through the use of the --backtrace flag should seeing those gems be necessary.

@thiagoa thiagoa changed the title Filter from back trace commonly used gems during RSpec execution Configure RSpec backtrace error reporting Oct 1, 2021
@stevepolitodesign stevepolitodesign added the Enhancement Features we're considering adding label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Features we're considering adding
Projects
None yet
Development

No branches or pull requests

2 participants