spec/rake/funnel/tasks/copy_spec.rb in rake-funnel-0.21.0 vs spec/rake/funnel/tasks/copy_spec.rb in rake-funnel-0.21.1
- old
+ new
@@ -1,11 +1,8 @@
-include Rake
-include Rake::Funnel::Support
-
describe Rake::Funnel::Tasks::Copy do
before do
- Task.clear
+ Rake::Task.clear
end
describe 'defaults' do
its(:name) { should == :copy }
its(:source) { should eq([]) }
@@ -13,32 +10,29 @@
end
describe 'execution' do
let(:source) { %w(one two) }
let(:target) { 'target' }
- let(:finder) { instance_double(Finder).as_null_object }
+ let(:finder) { instance_double(Rake::Funnel::Support::Finder).as_null_object }
before do
allow(finder).to receive(:all_or_default).and_return(source)
- allow(Finder).to receive(:new).and_return(finder)
+ allow(Rake::Funnel::Support::Finder).to receive(:new).and_return(finder)
+ allow(Rake::Funnel::Support::Copier).to receive(:copy)
end
- before do
- allow(Copier).to receive(:copy)
- end
-
subject do
described_class.new do |t|
t.source = source
t.target = target
end
end
before do
- Task[subject.name].invoke
+ Rake::Task[subject.name].invoke
end
it 'should delegate to Copier' do
- expect(Copier).to have_received(:copy).with(source, subject.target)
+ expect(Rake::Funnel::Support::Copier).to have_received(:copy).with(source, subject.target)
end
end
end