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

- old
+ new

@@ -1,15 +1,10 @@ # rubocop:disable RSpec/FilePath -include Rake -include Rake::Funnel -include Rake::Funnel::Support -include Rake::Funnel::Support::MSDeploy - describe Rake::Funnel::Tasks::MSDeploy do before do - Task.clear + Rake::Task.clear end describe 'defaults' do its(:name) { should == :msdeploy } its(:msdeploy) { should == 'msdeploy' } @@ -35,26 +30,26 @@ end before do allow(subject).to receive(:shell) - allow(RegistryPatch).to receive(:new).and_yield + allow(Rake::Funnel::Support::MSDeploy::RegistryPatch).to receive(:new).and_yield end describe 'argument mapping and invocation' do - let(:mapper) { instance_double(Mapper).as_null_object } + let(:mapper) { instance_double(Rake::Funnel::Support::Mapper).as_null_object } before do - allow(Mapper).to receive(:new).and_return(mapper) + allow(Rake::Funnel::Support::Mapper).to receive(:new).and_return(mapper) end before do - Task[subject.name].invoke + Rake::Task[subject.name].invoke end it 'should use MSDeploy mapper' do - expect(Mapper).to have_received(:new).with(:MSDeploy) + expect(Rake::Funnel::Support::Mapper).to have_received(:new).with(:MSDeploy) end it 'should map arguments' do expect(mapper).to have_received(:map).with(args) end @@ -66,11 +61,11 @@ end end describe 'arg examples' do before do - Task[subject.name].invoke + Rake::Task[subject.name].invoke end context 'skip actions' do let(:args) do { @@ -146,11 +141,11 @@ let(:args) do { verb: :sync, pre_sync: { run_command: 'cd "C:\Program Files"', - dont_use_command_exe: :true + dont_use_command_exe: true }, source: { content_path: 'deploy' }, dest: { @@ -175,15 +170,15 @@ end end describe "MSDeploy's idiocy" do before do - Task[subject.name].invoke + Rake::Task[subject.name].invoke end describe 'version registry value that is required to exist' do it 'should patch the registry' do - expect(RegistryPatch).to have_received(:new) + expect(Rake::Funnel::Support::MSDeploy::RegistryPatch).to have_received(:new) end end describe 'command line parser that requires quotes inside but not outside parameters' do let(:msdeploy) { 'path to/msdeploy' }