Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions features/config_coverage_dir.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,16 @@ Feature:
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
2 changes: 1 addition & 1 deletion lib/simplecov/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def coverage_dir(dir=nil)
# values. Will create the directory if it's missing
#
def coverage_path
coverage_path = File.join(root, coverage_dir)
coverage_path = File.expand_path(coverage_dir, root)
FileUtils.mkdir_p coverage_path
coverage_path
end
Expand Down