1

だから私はRubyTest / Sublime Text 3をセットアップしましたが、それはうまくいきます。RubyTest で spring を動作させるのに問題があります。この不可解な設定があります:

"check_for_spring": false,

しかし、true に設定してテストを実行すると、デフォルトの spring コマンド出力が表示されます。

Version: 1.1.3

Usage: spring COMMAND [ARGS]

Commands for spring itself:

この URL ( https://github.com/rails/spring ) の情報に従うと、テストを呼び出す正しい方法は?

bin/rake test test/functional/posts_controller_test.rb

テスト実行の現在の設定は次のとおりです。

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

私が変更しようとすると:

bin/rake test

これは機能しません。コマンド パスをコピー/貼り付けしても、コマンドが見つからないというエラーが発生し、シェルで機能します。

私はアイデアがありません。助けてください!

4

2 に答える 2

1

私はこれを使います

"run_ruby_unit_command": "spring rake test {relative_path}",
"run_single_ruby_unit_command": "spring rake test {relative_path} {test_name}"
于 2015-07-01T11:44:56.360 に答える
1

これはトリックを行います

"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}",
于 2014-06-30T10:28:15.033 に答える