Last active
December 27, 2015 14:09
-
-
Save madsheep/7338090 to your computer and use it in GitHub Desktop.
Ultimate solution for long running specs.
It's not that rails are slow, or rspec is slow, or ruby is slow. It's your code that is slow and/or poorly designed. The solution to slow tests problem is not optimizing them once the are too slow - it's about not letting them get slugish in the first place.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in your spec_helper.rb | |
RSpec.configure do |config| | |
config.around(:each) do |example| | |
timeout(0.2) { example.run } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment