Skip to content

Conversation

@solnic
Copy link
Collaborator

@solnic solnic commented May 28, 2025

This makes our spec suite better but I'm doing this because our tests started to fail recently with Excon adapter from webmock trying to mutate an array that is defined in Excon. This led me to discovering that load order of spec_helper is significant and we want to load it as soon as possible to get more consistent environment setup.

So this PR:

  • Adds --require spec_helper to .rspec
  • Removes all manual requires of spec_helper from sentry-ruby spec suite
  • Tweaks puma spec so that it force-loads its patches so that we don't care that sentry-ruby was already required by spec helper (a nice discovery)
  • Tweaks Rakefile to define isolated_specs task as a regular RSpec::Core::Task which is another small win here
  • Consolidates RSpec opts in .rspec so that we have the same settings when running isolated and regular specs

Not strictly needed but:

  • Changed rspec format to progress because it's faster, and you can see various warnings

#skip-changelog

@codecov
Copy link

codecov bot commented May 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.60%. Comparing base (4e520fc) to head (ca58eb5).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2640      +/-   ##
==========================================
+ Coverage   94.45%   96.60%   +2.15%     
==========================================
  Files         133      133              
  Lines        5101     5126      +25     
==========================================
+ Hits         4818     4952     +134     
+ Misses        283      174     -109     
Components Coverage Δ
sentry-ruby 97.34% <ø> (+2.42%) ⬆️
sentry-rails 92.65% <ø> (-3.90%) ⬇️
sentry-sidekiq 95.43% <ø> (+15.66%) ⬆️
sentry-resque 94.44% <ø> (ø)
sentry-delayed_job 94.68% <ø> (ø)
sentry-opentelemetry 99.31% <ø> (+0.68%) ⬆️

see 45 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@solnic solnic closed this May 28, 2025
@solnic solnic reopened this May 28, 2025
@solnic solnic marked this pull request as ready for review May 28, 2025 09:15
@solnic solnic requested a review from sl0thentr0py May 28, 2025 09:15
@solnic solnic merged commit 213558f into master May 28, 2025
143 checks passed
@solnic solnic deleted the fix-spec-suite branch May 28, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants