File: config_coverage_dir.feature

package info (click to toggle)
ruby-simplecov 0.22.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,500 kB
  • sloc: ruby: 5,550; makefile: 10
file content (36 lines) | stat: -rw-r--r-- 1,054 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@test_unit @config
Feature:

  The output directory for test coverage can be customized
  with the SimpleCov.coverage_dir setting. All coverage reports
  will be put there instead of the default 'coverage' directory
  in your project's root.

  Background:
    Given I'm working on the project "faked_project"

  Scenario:
    Given SimpleCov for Test/Unit is configured with:
      """
      require 'simplecov'
      SimpleCov.start do
        coverage_dir 'test/simplecov'
      end
      """

    When I successfully run `bundle exec rake test`
    Then a coverage report should have been generated in "test/simplecov"
    And a directory named "coverage" should not exist

  Scenario:
    Given SimpleCov for Test/Unit is configured with:
      """
      require 'simplecov'
      SimpleCov.start do
        coverage_dir '/tmp/test/simplecov'
      end
      """

    When I successfully run `bundle exec rake test`
    Then a coverage report should have been generated in "/tmp/test/simplecov"
    And a directory named "coverage" should not exist