相关疑难解决方法(0)

如何判断rspec在没有挂起测试输出的情况下运行?

有没有办法(可能是一些关键)告诉rspec跳过挂起的测试并且不打印有关它们的信息?

我有一些自动生成的测试

pending "add some examples to (or delete) #{__FILE__}"
Run Code Online (Sandbox Code Playgroud)

我运行"bundle exec rspec spec/models --format documentation"并得到这样的东西:

Rating
  allows to rate first time
  disallow to rate book twice

Customer
  add some examples to (or delete) /home/richelieu/Code/first_model/spec/models/customer_spec.rb (PENDING: No reason given)

Category
  add some examples to (or delete) /home/richelieu/Code/first_model/spec/models/category_spec.rb (PENDING: No reason given)
......
Run Code Online (Sandbox Code Playgroud)

我想保留这些文件,因为我稍后会更改它们,但是现在我想输出如下:

Rating
  allows to rate first time
  disallow to rate book twice

Finished in 0.14011 seconds
10 examples, 0 failures, 8 pending
Run Code Online (Sandbox Code Playgroud)

ruby rspec

16
推荐指数
3
解决办法
3809
查看次数

标签 统计

rspec ×1

ruby ×1