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 49 50 51 52 53 54 55 56 57 58 59
|
@minitest
Feature:
"Working with minitest"
Background:
Given I'm working on the project "faked_project"
Scenario:
Given SimpleCov for Minitest is configured with:
"""
require 'simplecov'
SimpleCov.start do
add_filter "test_helper.rb"
end
"""
When I open the coverage report generated with `bundle exec rake minitest`
Then I should see the groups:
| name | coverage | files |
| All Files | 87.5% | 2 |
And I should see the source files:
| name | coverage |
| lib/faked_project/some_class.rb | 80.00 % |
| minitest/some_test.rb | 100.00 % |
Scenario:
Given SimpleCov for Minitest is configured with:
"""
require 'simplecov'
SimpleCov.start
"""
When I open the coverage report generated with `bundle exec ruby -Ilib:minitest minitest/other_test.rb`
Then I should see the groups:
| name | coverage | files |
| All Files | 80.0% | 1 |
And I should see the source files:
| name | coverage |
| lib/faked_project/some_class.rb | 80.00 % |
Scenario: Not having simplecov loaded/enabled it does not crash #877
Given SimpleCov for Minitest is configured with:
"""
# nothing
"""
# What's this? Path requirements in the Gemfile evaluate the gemspec,
# which normally loads the version, which defined SimpleCov which leads
# to a different failure. This works around that issue.
# Somehow putting an arbitrary version broks the Gemfile. Using a current
# version seems to work.
And I set the environment variables to:
| variable | value |
| SIMPLECOV_NO_REQUIRE_VERSION | 0.22.0 |
When I successfully run `bundle exec rake minitest`
Then no coverage report should have been generated
|