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.
14 15 16 17 18 19 |
# File 'lib/knapsack_pro/test_flat_distributor.rb', line 14 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
21 22 23 24 |
# File 'lib/knapsack_pro/test_flat_distributor.rb', line 21 def nodes group_test_files_by_directory generate_nodes end |
#test_files_for_node(node_index) ⇒ Object
26 27 28 |
# File 'lib/knapsack_pro/test_flat_distributor.rb', line 26 def test_files_for_node(node_index) nodes[node_index] end |