spec/rake/funnel/tasks/assembly_version_spec.rb in rake-funnel-0.21.0 vs spec/rake/funnel/tasks/assembly_version_spec.rb in rake-funnel-0.21.1

- old
+ new

@@ -1,11 +1,8 @@ -include Rake -include Rake::Funnel::Support - describe Rake::Funnel::Tasks::AssemblyVersion do before do - Task.clear + Rake::Task.clear end describe 'defaults' do its(:name) { should == :version } its(:language) { should == :cs } @@ -19,14 +16,14 @@ expect(described_class.new.next_to_source(:cs, {}, 'blah/VERSION')).to eq('blah/VersionInfo.cs') end end describe 'execution' do - let(:writer) { instance_double(AssemblyVersionWriter).as_null_object } + let(:writer) { instance_double(Rake::Funnel::Support::AssemblyVersionWriter).as_null_object } before do - allow(AssemblyVersionWriter).to receive(:new).and_return(writer) + allow(Rake::Funnel::Support::AssemblyVersionWriter).to receive(:new).and_return(writer) end subject do described_class.new(:name) do |t| t.language = %i(cs vb) @@ -35,14 +32,15 @@ t.target_path = 'will not work' end end before do - Task[subject.name].invoke + Rake::Task[subject.name].invoke end it 'should pass source and source_args' do - expect(AssemblyVersionWriter).to have_received(:new).with(subject.source, subject.source_args) + expect(Rake::Funnel::Support::AssemblyVersionWriter).to have_received(:new) + .with(subject.source, subject.source_args) end it 'should use writer' do expect(writer).to have_received(:write).with(subject.target_path, subject.language) end