在rspec
测试中,可以指定测试类型,例如
it 'should behave', type: :system do
...
end
:type的有效值是什么,如果是,在哪里记录下来。
答案 0 :(得分:0)
- Model specs: type: `:model`
- Controller specs: type: `:controller`
- Request specs: type: `:request`
- Feature specs: type: `:feature`
- View specs: type: `:view`
- Helper specs: type: `:helper`
- Mailer specs: type: `:mailer`
- Routing specs: type: `:routing`
- Job specs: type: `:job`
- System specs: type: `:system`
此外,正如arieljuod所说,您可以拥有custom spec types