File: config_command_name.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 (48 lines) | stat: -rw-r--r-- 1,517 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
37
38
39
40
41
42
43
44
45
46
47
48
@test_unit @rspec @merging @config
Feature: Custom names for individual test suites

  Each test suite needs a name it can be identified by. SimpleCov tries
  best to detect Rails' Unit, Functional, Integration tests as well as regular
  Test/Unit, RSpec and Cucumber, but if that is insufficient, each test suite
  config can be given a custom command name using SimpleCov.command_name.

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

  Scenario:
    Given SimpleCov for Test/Unit is configured with:
      """
      require 'simplecov'
      SimpleCov.start do
        command_name "I'm in UR Unitz"
      end
      """
    Given SimpleCov for RSpec is configured with:
      """
      require 'simplecov'
      SimpleCov.start do
        command_name "Dreck macht Speck"
      end
      """

    When I open the coverage report generated with `bundle exec rake test`
    Then the report should be based upon:
      | I'm in UR Unitz |

    When I open the coverage report generated with `bundle exec rspec spec`
    Then the report should be based upon:
      | Dreck macht Speck |
      | I'm in UR Unitz   |

  Scenario: RSpec auto detection with spec/features
    Given SimpleCov for RSpec is configured with:
      """
      require 'simplecov'
      SimpleCov.start
      """
    And a file named "spec/features/foobar_spec.rb" with:
      """
      """
    When I open the coverage report generated with `bundle exec rspec spec`
    Then the report should be based upon:
      | RSpec |