Class: TestDiff::TrackBuild
- Inherits:
-
Object
- Object
- TestDiff::TrackBuild
- Defined in:
- lib/test_diff/track_build.rb
Overview
Class used to calculate the tests than need to be run
Instance Method Summary collapse
-
#initialize(sha) ⇒ TrackBuild
constructor
A new instance of TrackBuild.
- #run ⇒ Object
Constructor Details
#initialize(sha) ⇒ TrackBuild
Returns a new instance of TrackBuild.
7 8 9 |
# File 'lib/test_diff/track_build.rb', line 7 def initialize(sha) @sha = sha end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 |
# File 'lib/test_diff/track_build.rb', line 11 def run git = Git.open('.') sha = git.object(@sha || 'HEAD').sha File.open('test_diff_coverage/sha', 'w+') { |f| f << sha } end |