Helps
“How do I avoid timing problems while doing integration tests on single page apps?”
- Use a
wait_untilblock with a selector which has not been cached. - Use a
wait_untilblock with a piece of javascript usingevaluate_scriptwhich you expect to return when your page is finished loading. - Use a
wait_untilblock which waits for all AJAX to stop using$.ajaxStop().
Interesting
Time.parse(invalid)will throw an exception, but
Time.zone.parse(invalid)will returnnil. BecauseTime.parseis part of the Ruby library whileTime.zoneis part of Rails.parallel_testsreally does speed up your tests. It munges all the output together into an ugly mess though.
I tried parallel_tests but found Specjour easier to deal with. I also found that tests didn’t speed up much until I put MySQL on a RAM disk (might be unnecessary if you’re using an SSD)
May 3, 2012 at 4:06 pm
What Erik said and curious whether other people have tried specjour. I’ve seen a lot of custom setups for running specs in parallel but surprisingly few things which are off the shelf or nearly so.
May 3, 2012 at 9:10 pm