Class: KnapsackPro::TestFlatDistributor
- Inherits:
-
Object
- Object
- KnapsackPro::TestFlatDistributor
- Defined in:
- lib/knapsack_pro/test_flat_distributor.rb
Constant Summary collapse
- DIR_TYPES =
[ :feature, :integration, :e2e, :models, :views, :controllers, ]
Instance Method Summary collapse
-
#initialize(test_files, node_total) ⇒ TestFlatDistributor
constructor
A new instance of TestFlatDistributor.
- #nodes ⇒ Object
- #test_files_for_node(node_index) ⇒ Object
Constructor Details
#initialize(test_files, node_total) ⇒ TestFlatDistributor
Returns a new instance of TestFlatDistributor.
12 13 14 15 16 17 |
# File 'lib/knapsack_pro/test_flat_distributor.rb', line 12 def initialize(test_files, node_total) @test_files = test_files @node_total = node_total set_default_nodes_hash set_grouped_test_files end |
Instance Method Details
#nodes ⇒ Object
19 20 21 22 |
# File 'lib/knapsack_pro/test_flat_distributor.rb', line 19 def nodes group_test_files_by_directory generate_nodes end |
#test_files_for_node(node_index) ⇒ Object
24 25 26 |
# File 'lib/knapsack_pro/test_flat_distributor.rb', line 24 def test_files_for_node(node_index) nodes[node_index] end |