Run feature specs after all other specs
Want to see all of your fast specs finish before running slow feature specs? Try this:
# spec_helper.rb
RSpec.configure do |config|
#...
config.order_groups do |groups|
features, others = groups.partition { |g|
g.metadata[:type] == :feature
}
others.shuffle + features
end
# Be sure this it commented out...
#config.order = "random"
end
Written by Christian Nelson
Related protips
1 Response
I almost feel like this should be the default (or at least an option) in rspec itself. This is how I usually want to run my tests.
over 1 year ago
·
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#