spec/rake/funnel/support/copier_spec.rb in rake-funnel-0.18.0 vs spec/rake/funnel/support/copier_spec.rb in rake-funnel-0.19.0
- old
+ new
@@ -13,25 +13,25 @@
end
end
end
describe 'recursive copy' do
- before {
+ before do
allow(File).to receive(:directory?).and_return(false)
directories.each do |dir|
allow(File).to receive(:directory?).with(dir).and_return(true)
end
allow(RakeFileUtils).to receive(:mkdir_p)
allow(RakeFileUtils).to receive(:cp)
- }
+ end
- before {
+ before do
described_class.copy(source, target)
- }
+ end
def no_prefix(file)
- file.sub(%r|bin/|, '')
+ file.sub(%r{bin/}, '')
end
it 'should create target directories' do
expect(RakeFileUtils).to have_received(:mkdir_p).with(File.join(target, '3'))
expect(RakeFileUtils).to have_received(:mkdir_p).with(File.join(target, 'directory'))