2
當我運行RSpec的與--tag選項運行不同的測試比用相同--tag選項
spring rspec --tag ~slow
無我的測試運行rspec的春天,我看到這個意外的輸出:
Run options:
include {:focus=>true}
exclude {:slow=>true}
All examples were filtered out; ignoring {:focus=>true}
All examples were filtered out
Finished in 0.21728 seconds (files took 0.43359 seconds to load)
0 examples, 0 failures
當我運行:
rspec --tag ~slow
我看到下面的組預期的測試運行:
Run options:
include {:focus=>true}
exclude {:slow=>true}
All examples were filtered out; ignoring {:focus=>true}
.
. testing output remove for berevity
.
Finished in 6.9 seconds (files took 15.29 seconds to load)
179 examples, 0 failures, 4 pending
這是一個問題,我可以修復或者,如果我想使用彈簧,我必須放棄使用--tags?
TL; DR:似乎我必須選擇使用Spring的節省時間,還是節省跳過rspec慢速測試的時間。無法同時獲得。
附錄: 春季提交的問題在這裏:https://github.com/rails/spring/issues/359