spec/rake/funnel/tasks/nunit_spec.rb in rake-funnel-0.1.0.pre vs spec/rake/funnel/tasks/nunit_spec.rb in rake-funnel-0.2.0.pre
- old
+ new
@@ -13,22 +13,10 @@
its(:args) { should == {} }
its(:nunit) { should == 'nunit-console.exe' }
its(:files) { should == %w(build/specs/**/*.dll build/specs/**/*.exe) }
end
- describe 'overriding defaults' do
- context 'when NUnit executable is specified' do
- subject {
- described_class.new do |t|
- t.nunit = 'custom nunit.exe'
- end
- }
-
- its(:nunit) { should == 'custom nunit.exe' }
- end
- end
-
describe 'execution' do
let(:args) { {} }
let(:mapper) { double(Mapper).as_null_object }
let(:finder) { double(Finder).as_null_object }
@@ -38,11 +26,11 @@
allow(Mapper).to receive(:new).and_return(mapper)
allow(Finder).to receive(:new).and_return(finder)
allow(NUnitPlugin).to receive(:setup)
- 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
}
before {
@@ -69,8 +57,18 @@
expect(Mono).to have_received(:invocation).with(subject.nunit)
end
it 'should run with sh' do
expect(subject).to have_received(:sh)
+ end
+
+ context 'with custom NUnit executable' do
+ subject {
+ described_class.new do |t|
+ t.nunit = 'custom nunit.exe'
+ end
+ }
+
+ its(:nunit) { should == 'custom nunit.exe' }
end
end
end