Menu

Post image 1
Post image 2
1 / 2
0

Skip the RSpec examples you don't need: rspec-tracer 2.0 in pre-release

DEV Community·Abhimanyu Singh·26 days ago
#B16sqT6W
#ruby#rails#testing#software#rspec#tracer
Reading 0:00
15s threshold

A ground-up rewrite of test-skip caching for RSpec, with pluggable storage, Rails-aware tracking, and a per-example tracks: DSL. You change one model. You run bundle exec rspec . Twenty minutes later, every test in the suite has run again — including the 1,800 examples that don't touch that model. This is the problem rspec-tracer solves. Cold run of a suite: everything runs. Second run with no edits: nothing runs. Edit one file: only the examples that depend on that file re-run. The 1.x line has been on RubyGems since 2021. I just shipped a 2.0 pre-release after a 4-year gap and a 17-day rebuild. This post is the field guide for what changed and how to test it. Install Pre-releases require explicit opt-in. In your Gemfile : # 2.0 is in pre-release. Pin to the pre-release version explicitly; # switch to '~> 2.0' once 2.0.0 final ships.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More