spec/unit/logger_spec.rb in watir-6.16.5 vs spec/unit/logger_spec.rb in watir-6.17.0

- old
+ new

@@ -32,16 +32,14 @@ it 'outputs to stdout by default' do expect { Watir.logger.warn('message') }.to output(/WARN Watir message/).to_stdout_from_any_process end it 'allows to output to file' do - begin - Watir.logger.output = 'test.log' - Watir.logger.warn('message') - expect(File.read('test.log')).to include('WARN Watir message') - ensure - File.delete('test.log') - end + Watir.logger.output = 'test.log' + Watir.logger.warn('message') + expect(File.read('test.log')).to include('WARN Watir message') + ensure + File.delete('test.log') end it 'allows to deprecate functionality' do message = /WARN Watir \[DEPRECATION\] #old is deprecated\. Use #new instead\./ expect { Watir.logger.deprecate('#old', '#new') }.to output(message).to_stdout_from_any_process