Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Faster RSpec with JRuby

I'm pretty new to the whole JRuby world. I'm using RSpec on a pretty big test suite. I'd like to be able to run the specs frequently but the JVM takes so long to startup it's becoming a real time drain.

Is there a way to keep the JVM running? or a way to get specs to run faster with JRuby?

like image 265
jpoz Avatar asked May 07 '10 17:05

jpoz


1 Answers

There are two things you could look into:

  1. Run a nailgun server and send spec runs to it. jruby --ng-server & and then jruby --ng -S spec or jruby --ng -S rake

  2. Use spork. http://www.ruby-forum.com/topic/190163 I hear that Roger Pack has a version that may work with JRuby. http://github.com/rdp/spork

like image 64
Nick Sieger Avatar answered Oct 02 '22 19:10

Nick Sieger