代码之家  ›  专栏  ›  技术社区  ›  Obromios

rspec:type的有效值是什么?

  •  -1
  • Obromios  · 技术社区  · 7 年前

    在一个 rspec 测试,可以指定测试的类型,例如。

    it 'should behave', type: :system do
       ...
    end
    

    1 回复  |  直到 7 年前
        1
  •  3
  •   Obromios    7 年前

    Relish documentation

    - 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`
    

    custom spec types