【问题标题】:Sublime Text 3, rbenv, TestUnit, RubyTest and Spring correct configuation to get tests workingSublime Text 3、rbenv、Test Unit、Ruby Test 和 Spring 正确配置以使测试正常工作
【发布时间】:2014-07-03 09:27:08
【问题描述】:

所以我设置了 RubyTest / Sublime Text 3 并且工作正常。我无法让 spring 在 RubyTest 中工作。有这个神秘的设置:

"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

这不起作用,即使我复制/粘贴命令路径并且它在 shell 中工作,也会给出未找到命令的错误。

我的想法没有帮助!

【问题讨论】:

    标签: sublimetext2 sublimetext sublimetext3 ruby-test


    【解决方案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}",
    

    【讨论】:

      【解决方案2】:

      我用这个

      "run_ruby_unit_command": "spring rake test {relative_path}",
      "run_single_ruby_unit_command": "spring rake test {relative_path} {test_name}"
      

      【讨论】:

        猜你喜欢
        • 2016-09-09
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-09-08
        • 1970-01-01
        相关资源
        最近更新 更多