If SimpleCov.root happens to be contained more than once in a file path, all occurrences will be removed by shortened_filename.
For example, the path when SimpleCov.root is /app:
app/app/controllers/application_controller.rb will be shortened to ../controllers/.lication_controller.rb
To fix this, I use a regex to only substitute the root at the start of a file path.
If
SimpleCov.root
happens to be contained more than once in a file path, all occurrences will be removed byshortened_filename
.For example, the path when
SimpleCov.root
is/app
:app/app/controllers/application_controller.rb
will be shortened to../controllers/.lication_controller.rb
To fix this, I use a regex to only substitute the root at the start of a file path.
@stevepeak