spec/rake/funnel/tasks/timing_spec.rb in rake-funnel-0.21.0 vs spec/rake/funnel/tasks/timing_spec.rb in rake-funnel-0.21.1
- old
+ new
@@ -1,16 +1,16 @@
-include Rake
-
describe Rake::Funnel::Tasks::Timing do
- include DSL
+ include Rake::DSL
before do
Rake.application = nil
- Task.clear
+ Rake::Task.clear
+ # rubocop:disable RSpec/ExpectInHook
expect(define_tasks).to be
expect(subject).to be
+ # rubocop:enable RSpec/ExpectInHook
end
let(:define_tasks) { task :task }
after do
@@ -57,11 +57,11 @@
allow(Rake.application).to receive(:load_rakefile)
Rake.application.top_level_tasks.unshift(:task)
allow(Rake.application).to receive(:exit_because_of_exception)
allow($stdout).to receive(:puts)
- allow($stderr).to receive(:puts)
+ allow(Kernel).to receive(:warn)
# The 'rake aborted!' message is #printed on $stderr.
allow($stderr).to receive(:print)
Rake.application.run
end
@@ -123,10 +123,10 @@
it 'should print the report' do
expect($stdout).to have_received(:puts).with(/Build time report/)
end
it 'should report failure' do
- expect($stderr).to have_received(:puts).with(/Status\s+Failed/)
+ expect(Kernel).to have_received(:warn).with(/Status\s+Failed/)
end
end
end
end
end