To pass rspec options from a rake task on command line, use the env variable SPEC_OPTS. For example, to enable backtrace logging when running all spec tests:
rake SPEC_OPTS=-b
References: http://rspec.rubyforge.org/rspec/1.1.12/classes/Spec/Rake/SpecTask.html
Filed under: ruby-on-rails, Tools | Tagged: rake, rspec, ruby, ruby-on-rais | Leave a Comment »