0

我爱上了 Rubymine,但出于某种原因,运行单个测试将始终运行该类的整个测试套件。当我看到控制台输出时,我是这样的:

/home/steve/.rvm/rubies/ruby-1.9.2-p136/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) -Itest /home/steve/Websites/myapp/test/integration/my_flow_test.rb --name=test_should_run_my_custom_test

我正在使用 Rails 3.1.0,我的所有测试都是 ActiveSupport::TestCase 或 Rails 默认支持的其他测试类之一,我的 Gemfile 中没有额外的 gem。据我所知,Rails 默认使用 MiniTest。这是我看到的问题:

-Itest /home/steve/Websites/myapp/test/integration/my_flow_test.rb
  --name=test_should_run_my_custom_test

当我遵循 Rails 测试指南时,它说调用单个测试的语法应该是这样的:

-Itest /home/steve/Websites/quest_start/myapp/integration/my_flow_test.rb
  -n test_should_run_my_custom_test

所以使用-n method_name而不是--name=method_name

在常规控制台中运行后一个命令可以按预期工作。这似乎是 RubyMine 内部的东西,有没有办法改变这个设置,或者 Rails 默认测试框架目前不完全支持?

4

0 回答 0