spec/unit/fetchers/path_fetcher_spec.rb in omnibus-4.0.0 vs spec/unit/fetchers/path_fetcher_spec.rb in omnibus-4.1.0
- old
+ new
@@ -2,20 +2,21 @@
module Omnibus
describe PathFetcher do
let(:source_path) { '/local/path' }
let(:project_dir) { '/project/dir' }
+ let(:build_dir) { '/build/dir' }
- let(:software) do
- double(Software,
+ let(:manifest_entry) do
+ double(ManifestEntry,
name: 'software',
- source: { path: source_path },
- project_dir: project_dir,
- )
+ locked_version: nil,
+ described_version: nil,
+ locked_source: { path: source_path })
end
- subject { described_class.new(software) }
+ subject { described_class.new(manifest_entry, project_dir, build_dir) }
describe '#fetch_required?' do
context 'when the SHAs match' do
before do
allow(subject).to receive(:target_shasum).and_return('abcd1234')
@@ -87,10 +88,10 @@
allow(subject).to receive(:create_required_directories)
allow(FileSyncer).to receive(:sync)
end
it 'copies the new files over' do
- expect(FileSyncer).to receive(:sync).with(source_path, project_dir)
+ expect(FileSyncer).to receive(:sync).with(source_path, project_dir, {})
subject.fetch
end
end
describe '#version_for_cache' do