如何解决rspec-向测试添加多种类型
想知道是否有可能用多种类型标记测试,例如:
it 'should run as part of smoke or integration tests',:type => 'smoke,integration' do
response = @sample_request.echo("EXAMPLE5","EXAMPLE6")
expect(response.status).to equal(200)
end
并在应用两个过滤器之一时运行它:
bundle exec rspec --tag type:smoke
OR
bundle exec rspec --tag type:integration
解决方法
您应该可以使用数组来做到这一点。
it '...',:type => ['smoke','integration'] do
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。