spec/rake/funnel/integration/sync_output_spec.rb in rake-funnel-0.21.2 vs spec/rake/funnel/integration/sync_output_spec.rb in rake-funnel-0.22.0
- old
+ new
@@ -1,14 +1,14 @@
describe Rake::Funnel::Integration::SyncOutput do
context 'stream supports sync mode' do
before do
allow($stdout).to receive(:sync=)
allow($stderr).to receive(:sync=)
-
- expect(subject).to be # rubocop:disable RSpec/ExpectInHook
end
+ subject! { described_class.new }
+
it 'should immediately flush $stdout' do
expect($stdout).to have_received(:sync=).with(true)
end
it 'should immediately flush $stderr' do
@@ -20,12 +20,12 @@
before do
allow($stdout).to receive(:sync=).and_raise('$stdout.sync not supported')
allow($stderr).to receive(:sync=).and_raise('$stderr.sync not supported')
allow(Rake).to receive(:rake_output_message)
-
- expect(subject).to be # rubocop:disable RSpec/ExpectInHook
end
+
+ subject! { described_class.new }
it 'should log the error for $stdout' do
expect(Rake).to have_received(:rake_output_message).with(/Failed.*\$stdout/)
end