문제

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!

도움이 되었습니까?

해결책

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}",

다른 팁

I use this

"run_ruby_unit_command": "spring rake test {relative_path}",
"run_single_ruby_unit_command": "spring rake test {relative_path} {test_name}"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top