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

In rails projects, track changes to erb/slim/jbuilder files #66

Open
la-magra opened this issue Jan 22, 2023 · 0 comments
Open

In rails projects, track changes to erb/slim/jbuilder files #66

la-magra opened this issue Jan 22, 2023 · 0 comments

Comments

@la-magra
Copy link

Is your feature request related to a problem? Please describe.

Problem: A developer modifies a view, runs rspec, if the tests are already cached, no tests are run (with the recommended config in https://github.com/avmnu-sng/rspec-tracer#getting-started).

Describe the solution you'd like

If a erb|slim|jbuilder file is modified, their related specs should be invalidated so tests can run again.

Describe alternatives you've considered

Right now, what some do is rm -rf rspec_tracer_cache/*, and run the tests they want, but they have to remember to do so.

Some other rails projects put rspec-tracer behind a environment flag to control when rspec-tracer runs with rspec, but they have to remember to set it.

# ./spec/spec_helper.rb
require 'simplecov'
SimpleCov.start

if ENV['RSPECACHE']
  require 'rspec_tracer'
  RSpecTracer.start
end
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

No branches or pull requests

1 participant