RSpec comes with a Rake task for executing specs. See Spec::Rake::SpecTask API for details. Rake task example This is a snippet from RSpec’s own Rakefile. It creates a task to run the examples. require 'rake' require 'spec/rake/spectask' desc "Run all examples" Spec::Rake::SpecTask.new('examples') do |t| t.spec_files = FileList['examples/**/*.rb'] end It can be invoked from the command line with: