spec/rake/funnel/tasks/quick_template_spec.rb in rake-funnel-0.1.0.pre vs spec/rake/funnel/tasks/quick_template_spec.rb in rake-funnel-0.2.0.pre

- old
+ new

@@ -3,43 +3,16 @@ include Rake include Rake::Funnel::Support describe Rake::Funnel::Tasks::QuickTemplate do before { - CLEAN.clear Task.clear } describe 'defaults' do its(:name) { should == :template } its(:search_pattern) { should eq(%w(**/*.erb)) } its(:context) { should kind_of?(Binding) } - - describe 'target files are cleaned' do - let(:templates) { [] } - let(:finder) { double(Finder).as_null_object } - - before { - allow(finder).to receive(:all_or_default).and_return(templates) - allow(Finder).to receive(:new).and_return(finder) - } - - subject! { described_class.new } - - context 'no templates found' do - it 'should not add the target files' do - expect(CLEAN).to be_empty - end - end - - context 'templates found' do - let(:templates) { %w(1.template foo/2.template bar/3.some_other_extension) } - - it 'should add the target files' do - expect(CLEAN).to match_array(%w(1 foo/2 bar/3)) - end - end - end end describe 'execution' do let(:templates) { %w(1.template two/2.template) }