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.
-
#tests_folder ⇒ Object
readonly
Returns the value of attribute tests_folder.
Instance Method Summary collapse
-
#initialize(tests_folder, groups_of, group) ⇒ RunDiff
constructor
A new instance of RunDiff.
- #run ⇒ Object
Constructor Details
#initialize(tests_folder, groups_of, group) ⇒ RunDiff
Returns a new instance of RunDiff.
7 8 9 10 11 12 |
# File 'lib/test_diff/run_diff.rb', line 7 def initialize(tests_folder, groups_of, group) @tests_folder = tests_folder @tests_to_run = [] @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 |
#tests_folder ⇒ Object (readonly)
Returns the value of attribute tests_folder.
5 6 7 |
# File 'lib/test_diff/run_diff.rb', line 5 def tests_folder @tests_folder end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/test_diff/run_diff.rb', line 14 def run add_changed_files remove_tests_that_do_not_exist remove_tests_in_wrong_folder select_test_group run_test_group end |