Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does `rails spec` do that `rspec` does not?

What is it that rails spec does, if anything, that rspec alone does not?

I was looking for a way to run only specific RSpec tests from the command line, and the only way I found requires running rspec directly (rspec --tag focus ..., not via rails spec. I could do that, but I'm concerned that maybe doing so bypassing some important setup or other functionality.

like image 970
Keith Bennett Avatar asked Sep 13 '25 10:09

Keith Bennett


1 Answers

It seems it calls rails test:prepare before actually calling rspec:

https://github.com/rspec/rspec-rails/blob/master/lib/rspec/rails/tasks/rspec.rake#L11

like image 73
Marek Lipka Avatar answered Sep 15 '25 00:09

Marek Lipka