Last Updated: February 25, 2016
·
889
· idrozd

Know your RSpec cli arguments!

Using pry-rescue with spork/spring backed-rspec at will:

spring rspec spec/some/tricky_spec.rb --require pry-rescue/rspec
# or just
spring rspec spec/some/tricky_spec.rb -r pry-rescue/rspec

Running only fast examples by default, and still having rake running all of them on CI server:

.rspec

--require spec_helper
--tag ~slow

Rakefile

require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec) do |t|
  t.rspec_opts = "--options .rspec-all-examples"
end

spec/.rspec-all-examples

--require spec_helper
# no excluding --tag here

rspec cli documentation