Question

So I've setup RubyTest / Sublime Text 3 and that works fine. I'm having trouble getting spring to work in RubyTest. There is this cryptic setting:

"check_for_spring": false,

But when I set to true and run a test it just gives me the default spring command output e.g:

Version: 1.1.3

Usage: spring COMMAND [ARGS]

Commands for spring itself:

If I follow info on this url (https://github.com/rails/spring), correct way to call a test is?

bin/rake test test/functional/posts_controller_test.rb

Now my current settings for test running are:

"run_ruby_unit_command": "ruby -Itest {relative_path}",
"run_single_ruby_unit_command": "ruby -Itest {relative_path} -n '{test_name}'",

If I try chaning to:

bin/rake test

This doesn't work, gives a command not found error even if I copy / paste the command path and it works in shell.

I'm out of ideas help!

Was it helpful?

Solution

This will do the trick

"run_ruby_unit_command": "export PATH=~/.rbenv/shims:$PATH; bin/rake test -Itest {relative_path}",
"run_single_ruby_unit_command": "export PATH=~/.rbenv/shims:$PATH; bin/rake test {relative_path} {test_name}",

OTHER TIPS

I use this

"run_ruby_unit_command": "spring rake test {relative_path}",
"run_single_ruby_unit_command": "spring rake test {relative_path} {test_name}"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top