4 ms·
If RSpec is too slow to wait on you could use autotest, which automatically runs tests when a file is saved. There's also a plugin for it that uses growl/libno
by gnubardt 16y ago
If RSpec is too slow to wait on you could use autotest, which automatically runs tests when a file is saved. There's also a plugin for it that uses growl/libnotify to display the results.
- petercooper 16y agoA common problem at the moment is RSpec being slow with Rails 3 and Ruby 1.9.2. If you do things the "normal" way, Rails ends up having to load twice and you're guaranteed to spend at least 10 minute looking at nothing. The solution is to use Spork to have a Rails test environment running permanently (it also does caretaking between sessions) and then RSpec will access it over DRb. Couple this with a good .watchr file to run only the relevant specs when you update them and you get very quick RSpec tests. It's a bit of a pain to set everything up but it's worked great for me.
- petercooper 16y agoI was inspired to write up how to do this: http://www.rubyinside.com/how-to-rails-3-and-rspec-2-4336.html http://www.rubyinside.com/how-to-rails-3-and-rspec-2-4336.ht...