Sha256: e5a22d5cb0b5509fbf8e1a6e67e8bd414ad12c9843831d9213781f674d0ec374
Contents?: true
Size: 951 Bytes
Versions: 5
Compression:
Stored size: 951 Bytes
Contents
describe Rake::Funnel::Tasks::Copy do before do Rake::Task.clear end describe 'defaults' do its(:name) { should == :copy } its(:source) { should eq([]) } its(:target) { should be_nil } end describe 'execution' do let(:source) { %w(one two) } let(:target) { 'target' } let(:finder) { instance_double(Rake::Funnel::Support::Finder).as_null_object } before do allow(finder).to receive(:all_or_default).and_return(source) allow(Rake::Funnel::Support::Finder).to receive(:new).and_return(finder) allow(Rake::Funnel::Support::Copier).to receive(:copy) end subject do described_class.new do |t| t.source = source t.target = target end end before do Rake::Task[subject.name].invoke end it 'should delegate to Copier' do expect(Rake::Funnel::Support::Copier).to have_received(:copy).with(source, subject.target) end end end
Version data entries
5 entries across 5 versions & 1 rubygems