Rspec命令跳过视图规范

时间:2017-12-07 05:52:16

标签: ruby-on-rails rspec rspec-rails

当我们rspec命令它运行所有规范时。我不想运行视图规范。

disable/skip查看规格吗?

除了制作这些规格pending ..

1 个答案:

答案 0 :(得分:3)

你应该尝试这样的事情 -

使用--exclude-pattern

rspec --exclude-pattern "spec/views/**/*_spec.rb"

https://www.relishapp.com/rspec/rspec-core/v/3-3/docs/configuration/exclude-pattern