When I run rspec in Rails, it seems that a ruby process is created and loaded with rails components due to the statement require ''spec_helper''. This usually takes a while to run even a single spec. Does a tool for rspec like rails console exist so that you can run specs continuously without loading everything each time? autotest actually starts a new process each time when there is a change, and I can still feel the obvious delay. Any idea? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110322/66b84abf/attachment.html>
Katrina Owen
2011-Mar-22 21:59 UTC
[rspec-users] Is it possible to run rspec continuously?
Hi there, Check out Spork. Spork will fire up a distributed ruby process that your tests can run in. You''ll need to restart spork any time environment files change (check out guard for this, though), but that''s minor considering the increase in speed that you can see. Katrina On Tue, Mar 22, 2011 at 10:37 PM, Benyi Wang <bewang.tech at gmail.com> wrote:> When I run rspec in Rails, it seems that a ruby process is created and > loaded with rails components due to the statement require ''spec_helper''. > This usually takes a while to run even a single spec. Does a tool for rspec > like rails console exist so that you can run specs continuously without > loading everything each time? > autotest actually starts a new process each time when there is a change, and > I can still feel the obvious delay. > Any idea? > Thanks. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On Tue, Mar 22, 2011 at 2:37 PM, Benyi Wang <bewang.tech at gmail.com> wrote:> When I run rspec in Rails, it seems that a ruby process is created and > loaded with rails components due to the statement require ''spec_helper''. > This usually takes a while to run even a single spec. Does a tool for rspec > like rails console exist so that you can run specs continuously without > loading everything each time? > > autotest actually starts a new process each time when there is a change, > and I can still feel the obvious delay. > > Any idea? > > Thanks. > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >Take a look at Spork: http://chrismdp.github.com/2010/11/getting-spork-working-now-on-rails-3-rspec-2-and-cucumber/ https://github.com/timcharper/spork -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110322/3157a29a/attachment.html>
Check out this book: http://www.pragprog.com/titles/rcctr/continuous-testing-with-ruby It is about to be published and is available as a beta PDF. They cover several tools and both why and how to use them. On Mar 22, 2011 2:57 PM, "Benyi Wang" <bewang.tech at gmail.com> wrote:> When I run rspec in Rails, it seems that a ruby process is created and > loaded with rails components due to the statement require ''spec_helper''. > This usually takes a while to run even a single spec. Does a tool forrspec> like rails console exist so that you can run specs continuously without > loading everything each time? > > autotest actually starts a new process each time when there is a change,and> I can still feel the obvious delay. > > Any idea? > > Thanks.-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110322/c3ab0446/attachment.html>