guides icon indicating copy to clipboard operation
guides copied to clipboard

"bundle exec rspec spec" vs rake spectask

Open phiggins opened this issue 14 years ago • 4 comments

Instead of "bundle exec rspec spec", I think it's more user-friendly to use rspec's built-in rake SpecTask detailed here: http://rspec.info/documentation/tools/rake.html

phiggins avatar Oct 14 '10 21:10 phiggins

This is not an available-by-default Rake task (it seems to be rspec 1.3), but I admit I would prefer one because it's shorter to type.

radar avatar Oct 14 '10 22:10 radar

In RSpec2, the Rake Task automatically uses bundle exec if the project uses Bundler.

http://github.com/rspec/rspec-core/blob/master/lib/rspec/core/rake_task.rb#L139

txus avatar Oct 15 '10 17:10 txus

Where in the guide would you introduce this?

radar avatar Oct 16 '10 08:10 radar

At the point you start with this "To run the rspec command for our bundle ..." when you begin talking about executing the specs. You've already introduced the Rakefile at that point.

phiggins avatar Oct 16 '10 18:10 phiggins