【问题标题】:Clear previous tests in RSpec while running new tests using Guard在使用 Guard 运行新测试时清除 RSpec 中的先前测试
【发布时间】:2014-06-27 13:55:39
【问题描述】:

寻找在出现新测试结果时清除终端的方法。我现在觉得在清除旧测试之前附加新的测试结果很混乱。有什么办法吗?

我的保护文件:

guard :rspec do
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^lib/(.+)\.rb$})     { |m| "spec/lib/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')  { "spec" }
end

【问题讨论】:

    标签: rspec tdd guard


    【解决方案1】:

    the documentation:

    bundle exec guard --clear

    【讨论】:

    • 我们可以将此行添加到我们的Guardfile.rspec 吗?我不确定是哪一个
    • @mbigras 您可以在 Guardfile 之外的 guard do 块之外添加仅带有 clearing: on 的行,以达到相同的效果。
    • 小修正 - 将clearing :on 添加到您的Guardfile,而不是clearing: on github.com/guard/guard/wiki/…
    猜你喜欢
    • 1970-01-01
    • 2012-11-28
    • 2012-07-30
    • 2013-07-02
    • 1970-01-01
    • 1970-01-01
    • 2011-08-16
    • 2013-04-25
    • 2013-11-18
    相关资源
    最近更新 更多