Technology and Software

No output from rake spec

I created a new Rails project, wrote some tests with rspec, run rake spec and got no output, only a single “** Invoke spec (first_time, not_needed)” line.

After a lot of googling and after learning a lot of things that nevertheless didn’t solve the problem I finally found this thread with the solution: add gem “rspec-rails” to the development group in the Gemfile.

I don’t why I should need the rspec gem in the development environment when rake spec runs in the test one (add “puts Rails.env” in one of your spec files and see) but that’s it. I tried to outsmart the framework and lost half an hour. I hope this will help somebody to google the solution faster!

Standard