Class: TestDiff::RunDiff
- Inherits:
-
Object
- Object
- TestDiff::RunDiff
- Defined in:
- lib/test_diff/run_diff.rb
Overview
Class used to calculate the tests than need to be run
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#groups_of ⇒ Object
readonly
Returns the value of attribute groups_of.
-
#sha1 ⇒ Object
readonly
Returns the value of attribute sha1.
-
#spec_folder ⇒ Object
readonly
Returns the value of attribute spec_folder.
Instance Method Summary collapse
-
#initialize(spec_folder, sha1, groups_of, group) ⇒ RunDiff
constructor
A new instance of RunDiff.
- #run ⇒ Object
Constructor Details
#initialize(spec_folder, sha1, groups_of, group) ⇒ RunDiff
7 8 9 10 11 12 13 14 |
# File 'lib/test_diff/run_diff.rb', line 7 def initialize(spec_folder, sha1, groups_of, group) @spec_folder = spec_folder @sha1 = sha1 || File.read('test_diff_coverage/sha') @specs_to_run = [] @storage = Storage.new @groups_of = groups_of @group = group end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
5 6 7 |
# File 'lib/test_diff/run_diff.rb', line 5 def group @group end |
#groups_of ⇒ Object (readonly)
Returns the value of attribute groups_of.
5 6 7 |
# File 'lib/test_diff/run_diff.rb', line 5 def groups_of @groups_of end |
#sha1 ⇒ Object (readonly)
Returns the value of attribute sha1.
5 6 7 |
# File 'lib/test_diff/run_diff.rb', line 5 def sha1 @sha1 end |
#spec_folder ⇒ Object (readonly)
Returns the value of attribute spec_folder.
5 6 7 |
# File 'lib/test_diff/run_diff.rb', line 5 def spec_folder @spec_folder end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 |
# File 'lib/test_diff/run_diff.rb', line 16 def run add_changed_files remove_tests_in_wrong_folder select_test_group run_test_group end |