Kumaresan
Kumaresan

Reputation: 335

sublime-text-2-ruby-tests with Spork

Am pretty new to Ruby on Rails. Am following the tutorial at http://ruby.railstutorial.org/

The sublime-text-2-ruby-tests plugin test are very slow. How can we configure it to run with Spork to make them faster.

Upvotes: 1

Views: 849

Answers (2)

Tomas Romero
Tomas Romero

Reputation: 8708

Old question, but in case it could be useful to someone.

Once sublime-text-2-ruby-test plugin is installed, browse Sublime: Preferences -> Package Settings -> RubyTest -> Settings - Default.

In that file, change "run_rspec_command": "rspec {relative_path}" to "run_rspec_command": "bundle exec rspec {relative_path} --drb"

Upvotes: 0

Fer
Fer

Reputation: 3347

I followed the guide at http://ruby.railstutorial.org/chapters/static-pages#sec-guard and works pretty well. You will get extra shortcuts for the Sublime Text Editor 2 to run some tests.

For Linux those are:

  • Ctrl + Shift + R: run a single test (if run on an it block) or group of tests (if run on a describe block)
  • Ctrl + Shift + E: run the last test(s)
  • Ctrl + Shift + T: run all the tests in current file

Upvotes: 1

Related Questions