Why is RSpec so slow under Rails?

前端 未结 11 557
无人共我
无人共我 2020-12-24 05:00

Whenever I run rspec tests for my Rails application it takes forever and a day of overhead before it actually starts running tests. Why is rspec so slow? Is there a way to

11条回答
  •  春和景丽
    2020-12-24 06:02

    I definitely suggest checking out spork.

    http://spork.rubyforge.org/

    The railstutorial specifically addresses this, and gives a workaround to get spork running nicely in rails 3.0 (as of this moment, spork is not rails 3 ready out of the box). Of course, if you're not on rails 3.0, then you should be good to go.

    The part of the tutorial showing how to get spork running in rails 3.0

    http://railstutorial.org/chapters/static-pages#sec:spork

    Checking when spork is rails 3.0 ready

    http://www.railsplugins.org/plugins/440-spork

提交回复
热议问题