RSpec列出了所有待处理的示例

deb*_*deb 9 testing rspec ruby-on-rails rspec2

我正在使用Rspec来测试rails应用程序.

有没有办法在不运行完整测试套件的情况下列出所有待处理的示例?

dog*_*unk 10

运行rspec命令传递 --tag pending

例如: bundle exec rspec spec --tag pending

  • `bundle exec rspec spec`说我有15个待处理的例子,但添加`--tag pending`我只是得到`所有的例子都被过滤掉了`.无论这是做什么,它都没有列出所有未决的例子. (4认同)

spy*_*yle 6

对于 rspec 3.9,spec --dry-run这就是我想要的。

me@host> bundle exec rspec -v
RSpec 3.9
  - rspec-core 3.9.2
  - rspec-expectations 3.9.1
  - rspec-mocks 3.9.1
  - rspec-rails 4.0.0.beta3
  - rspec-support 3.9.3

me@host> bundle exec rspec spec --dry-run
Randomized with seed 17761
...........................****..............................................................................................................................................................................*******................................................................................................................*****.*.*...................................................................................................................

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) Klass completed
     # Not yet implemented
     # ./spec/models/klass.rb:79

  2) Klass completed with errors
     # Not yet implemented
     # ./spec/models/klass.rb:103
Run Code Online (Sandbox Code Playgroud)