spec/rake/funnel/tasks/paket_spec.rb in rake-funnel-0.1.0.pre vs spec/rake/funnel/tasks/paket_spec.rb in rake-funnel-0.2.0.pre
- old
+ new
@@ -12,71 +12,29 @@
its(:paket_args) { should == 'restore' }
its(:bootstrapper) { should == '.paket/paket.bootstrapper.exe' }
its(:bootstrapper_args) { should == nil }
end
- describe 'overriding defaults' do
- context 'when bootstrapper executable is specified' do
- subject {
- described_class.new do |t|
- t.bootstrapper = 'custom bootstrapper.exe'
- end
- }
-
- its(:bootstrapper) { should == 'custom bootstrapper.exe' }
- end
-
- context 'when bootstrapper args are specified' do
- subject {
- described_class.new do |t|
- t.bootstrapper_args = %w(arg1 arg2)
- end
- }
-
- its(:bootstrapper_args) { should == %w(arg1 arg2) }
- end
-
- context 'when paket executable is specified' do
- subject {
- described_class.new do |t|
- t.paket = 'custom paket.exe'
- end
- }
-
- its(:paket) { should == 'custom paket.exe' }
- end
-
- context 'when paket args are specified' do
- subject {
- described_class.new do |t|
- t.paket_args = %w(arg1 arg2)
- end
- }
-
- its(:paket_args) { should == %w(arg1 arg2) }
- end
- end
-
describe 'execution' do
before {
allow(subject).to receive(:sh)
- allow(Mono).to receive(:invocation).and_wrap_original do |original_method, *args, &block|
+ allow(Mono).to receive(:invocation).and_wrap_original do |_original_method, *args, &_block|
args.compact
end
}
- context 'with overridden defaults' do
+ context 'overriding defaults' do
subject {
described_class.new do |t|
t.bootstrapper = 'custom bootstrapper.exe'
t.bootstrapper_args = %w(arg1 arg2)
t.paket = 'custom paket.exe'
t.paket_args = %w(arg1 arg2)
end
}
before {
- allow(File).to receive(:exist?).with(subject.paket).and_return(false)
+ allow(File).to receive(:exist?).and_return(false)
allow(subject).to receive(:sh)
}
before {
Task[subject.name].invoke