Skip to content

Commit

Permalink
remove errant text
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed May 18, 2013
1 parent 5c1e67a commit c2a719f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spec/rspec/core/reporter_spec.rb
Expand Up @@ -140,14 +140,21 @@ module RSpec::Core
describe 'deprecation warning' do
let(:reporter) { Reporter.new double.as_null_object }

around do |example|
RSpec.configure { |config| @io = config.deprecation_io }
example.run
RSpec.configure { |config| config.deprecation_io = @io }
end

it 'doesnt warn when no deprecations' do
reporter.should_not_receive(:warn)
reporter.finish 1234
end

it 'warns when it has deprecations' do
RSpec.configure { |config| config.deprecation_io = StringIO.new }
RSpec.warn_deprecation 'message'
reporter.should_receive(:warn).with(/deprecations logged to STD_ERR/)
reporter.should_receive(:warn).with(/There were \d+ deprecations logged to .+/)
reporter.finish 1234
end
end
Expand Down

0 comments on commit c2a719f

Please sign in to comment.