Sha256: 7af849a0155ae644802291db0ae60ac2d26b3c0a19662a520fe3d43055167e5d
Contents?: true
Size: 1.53 KB
Versions: 87
Compression:
Stored size: 1.53 KB
Contents
describe KnapsackPro::QueueAllocatorBuilder do let(:adapter_class) { KnapsackPro::Adapters::BaseAdapter } let(:allocator_builder) { described_class.new(adapter_class) } describe '#allocator' do let(:allocator) { double } subject { allocator_builder.allocator } before do fast_and_slow_test_files_to_run = double expect(allocator_builder).to receive(:fast_and_slow_test_files_to_run).and_return(fast_and_slow_test_files_to_run) fallback_mode_test_files = double expect(allocator_builder).to receive(:fallback_mode_test_files).and_return(fallback_mode_test_files) repository_adapter = double expect(KnapsackPro::RepositoryAdapterInitiator).to receive(:call).and_return(repository_adapter) ci_node_total = double expect(KnapsackPro::Config::Env).to receive(:ci_node_total).and_return(ci_node_total) ci_node_index = double expect(KnapsackPro::Config::Env).to receive(:ci_node_index).and_return(ci_node_index) ci_node_build_id = double expect(KnapsackPro::Config::Env).to receive(:ci_node_build_id).and_return(ci_node_build_id) expect(KnapsackPro::QueueAllocator).to receive(:new).with( fast_and_slow_test_files_to_run: fast_and_slow_test_files_to_run, fallback_mode_test_files: fallback_mode_test_files, ci_node_total: ci_node_total, ci_node_index: ci_node_index, ci_node_build_id: ci_node_build_id, repository_adapter: repository_adapter, ).and_return(allocator) end it { should eq allocator } end end
Version data entries
87 entries across 87 versions & 1 rubygems