Created
February 25, 2015 03:41
-
-
Save tenderlove/7e6451f3a3da36e48310 to your computer and use it in GitHub Desktop.
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 'coverage' | |
require 'json' | |
Coverage.start | |
require 'minitest' | |
module America | |
LOGS = [] | |
Minitest.after_run { | |
File.open('run_log.json', 'w') { |f| f.write JSON.dump LOGS } | |
} | |
def self.run_one_method klass, method_name, reporter | |
puts "Hi mom" | |
before = Coverage.peek_result | |
super klass, method_name, reporter | |
after = Coverage.peek_result | |
LOGS << [ klass.name, method_name.to_s, before, after ] | |
end | |
end | |
Minitest::Runnable.extend America |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment