Created
July 8, 2016 12:34
-
-
Save akamike/393bede2b89645b946c8d95ac4f5bcf9 to your computer and use it in GitHub Desktop.
Simplecov greedy filepath replace example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Application | |
def did_not_touch | |
puts 'Poor coverage' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Runs a ruby container, mounting current directory at /app, | |
# installs simplecov then runs the test file to generate a report | |
# | |
# Resulting coverage report will show "application.rb" cut to "lication.rb" | |
docker run --rm -v "$PWD:/app" -w /app -it ruby \ | |
bash -c "gem install simplecov && ruby test.rb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'simplecov' | |
SimpleCov.start | |
require './application' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment