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] [rspecdoc]
[pry-rescue]: https://github.com/ConradIrwin/pry-rescue
[rspecdoc]: https://www.relishapp.com/rspec/rspec-core/v/2-14/docs/command-line
Written by Titov Andrey
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#