0

我最近从 TextMate 迁移到 RubyMine 并且到目前为止非常喜欢它。我注意到的一件事是 RubyMine 没有像 TextMate 那样的 Steak 插件,它允许运行单个场景。

有没有办法在 RubyMine 中做同样的事情,或者每次我想运行一个 Steak 测试时,我都会坚持运行完整的验收测试文件?

4

1 回答 1

0

Steak 是 rspec 的扩展。要在 rspec 中运行单个测试,您可以指定--tag

describe 'run this test', :focus => true do
  # this one will run
end

describe 'but not this one' do
  # wont get run
end

$ rspec --tag focus my_spec_file.rb

(注:我从未使用过红宝石)

于 2012-07-17T21:36:55.610 回答