How to test code coverage for Rails ERB templates?

后端 未结 2 1660
情歌与酒
情歌与酒 2020-12-15 07:59

I\'m just building a test suite for a legacy Rails app. The simplecov gem has been great for finding dark corners of the app which need test coverage (or which

相关标签:
2条回答
  • 2020-12-15 08:28

    try rake stats

    it would generate a table having the coverage of each of the parts of the app

    0 讨论(0)
  • 2020-12-15 08:30

    See: How do I get coverage for view specs with rspec, rails, and simplecov?

    The answer being, you can't:

    https://github.com/colszowka/simplecov/issues/38

    It's critical flaw that I hope someone will address. AFIK there is nothing better than simplecov for Ruby 1.9

    0 讨论(0)
提交回复
热议问题