discourse/spec
Martin Brennan aca6c462a6
DEV: Improve rspec gem backtrace exclusion ENV vars (#30056)
Followup:

* https://github.com/discourse/discourse/pull/28160
* https://github.com/discourse/discourse/pull/25921

In the previous PRs we added 2 environent variables
to control backtrace output for errors in rspec,
`RSPEC_EXCLUDE_NOISE_IN_BACKTRACE`, and
`RSPEC_EXCLUDE_GEMS_IN_BACKTRACE`

These largely do the same thing, and we want to enable
that behaviour by default.

This commit consolidates them into one env var,
`DISCOURSE_INCLUDE_GEMS_IN_RSPEC_BACKTRACE`, which is
disabled by default, meaning gem backtraces will not
be shown in rspec backtraces by default.

Also for the request spec use case with `RspecErrorTracker`,
we now show an indicator of how many lines were hidden from
the backtrace e.g. "...(21 framework line(s) excluded)",
and for this and the normal rspec backtrace exclusion we
show a warning if `DISCOURSE_INCLUDE_GEMS_IN_RSPEC_BACKTRACE`
is not enabled.
2024-12-04 09:54:11 +10:00
..
fabricators FIX: Hide broken theme about/license URLs (#29930) 2024-11-26 13:53:10 +10:00
fixtures DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
generator DEV: Silence the output of migration specs (#26365) 2024-03-26 11:32:44 +01:00
helpers DEV: Call Discourse.redis.flushdb after the end of each test (#29117) 2024-10-09 07:19:31 +08:00
import_export
initializers
integration DEV: deduplicate inline styles in emails (#30015) 2024-11-30 16:38:45 +01:00
integrity DEV: Add spec to ensure app works with multiple tagged loggers 2024-08-13 18:10:03 +02:00
jobs DEV: Add tl3_custom_promotions plugin modifier to tl3_promotions.rb (#29834) 2024-11-22 15:28:43 -05:00
lib DEV: Apply new Rubocop linting on services 2024-12-02 17:31:36 +01:00
mailers UX: Use a dropdown for SSL mode for group SMTP (#27932) 2024-07-18 10:33:14 +10:00
migrations FIX: font awesome remapping migration should not drop unmapped names from svg_icon_subset (#30058) 2024-12-03 18:30:08 +08:00
models DEV: Add posts_moved DiscourseEvent in PostMover (#30066) 2024-12-03 13:16:20 -06:00
multisite FEATURE: allow admins to enable announced experimental features (#29244) 2024-10-22 10:56:58 +11:00
requests FIX: better edit conflict handling (#29789) 2024-12-03 10:12:04 +01:00
script/import_scripts DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
serializers FEATURE: Show when a badge has been granted for a post (#29696) 2024-12-03 13:43:27 +11:00
services DEV: Fix constant redefinition warnings when running specs (#29837) 2024-11-20 15:17:36 +11:00
support DEV: Fix constant redefinition warnings when running specs (#29837) 2024-11-20 15:17:36 +11:00
system FEATURE: Show when a badge has been granted for a post (#29696) 2024-12-03 13:43:27 +11:00
tasks DEV: Fix constant redefinition warnings when running specs (#29837) 2024-11-20 15:17:36 +11:00
views FEATURE: Simplify crawler content for non-canonical post URLs (#26324) 2024-03-26 15:18:46 +00:00
rails_helper.rb DEV: Improve rspec gem backtrace exclusion ENV vars (#30056) 2024-12-04 09:54:11 +10:00
regenerate_swagger_docs
swagger_helper.rb