Class: TestDiff::TrackBuild

Inherits:
Object
  • Object
show all
Defined in:
lib/test_diff/track_build.rb

Overview

Class used to calculate the tests than need to be run

Instance Method Summary collapse

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

#runObject



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