spec/rubocop/cop/rspec/expect_output_spec.rb in rubocop-rspec-1.12.0 vs spec/rubocop/cop/rspec/expect_output_spec.rb in rubocop-rspec-1.13.0
- old
+ new
@@ -1,26 +1,26 @@
# frozen_string_literal: true
require 'spec_helper'
-describe RuboCop::Cop::RSpec::ExpectOutput do
+RSpec.describe RuboCop::Cop::RSpec::ExpectOutput do
subject(:cop) { described_class.new }
it 'registers an offense for overwriting $stdout within an example' do
expect_violation(<<-RUBY)
specify do
$stdout = StringIO.new
- ^^^^^^^ Use `expect { ... }.to output(...).to_stdout` instead of mutating $stdout
+ ^^^^^^^ Use `expect { ... }.to output(...).to_stdout` instead of mutating $stdout.
end
RUBY
end
it 'registers an offense for overwriting $stderr ' \
'within an example scoped hook' do
expect_violation(<<-RUBY)
before(:each) do
$stderr = StringIO.new
- ^^^^^^^ Use `expect { ... }.to output(...).to_stderr` instead of mutating $stderr
+ ^^^^^^^ Use `expect { ... }.to output(...).to_stderr` instead of mutating $stderr.
end
RUBY
end
it 'does not register an offense for interacting with $stdout' do