Sha256: 4443835e6c3f1527699d8a2ea7a1c0bbb0853b029542657dca4d8807285c1e78
Contents?: true
Size: 1.21 KB
Versions: 71
Compression:
Stored size: 1.21 KB
Contents
describe KnapsackPro::AllocatorBuilder 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 test_file_pattern = double expect(KnapsackPro::TestFilePattern).to receive(:call).with(adapter_class).and_return(test_file_pattern) test_files = double expect(KnapsackPro::TestFileFinder).to receive(:call).with(test_file_pattern).and_return(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) expect(KnapsackPro::Allocator).to receive(:new).with( test_files: test_files, ci_node_total: ci_node_total, ci_node_index: ci_node_index, repository_adapter: repository_adapter, ).and_return(allocator) end it { should eq allocator } end end
Version data entries
71 entries across 71 versions & 1 rubygems