Skip to content

Commit

Permalink
change filename to description
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed May 18, 2013
1 parent 6b49799 commit 6e05d1b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/rspec/core/deprecation.rb
Expand Up @@ -36,7 +36,7 @@ def deprecations?
# Used internally to print deprecation summary
def deprecations_summary
io = RSpec.configuration.deprecation_io
"There were #{io.deprecations} deprecations logged to #{io.filename}"
"There were #{io.deprecations} deprecations logged to #{io.description}"
end

end
Expand Down
6 changes: 3 additions & 3 deletions lib/rspec/core/deprecation_io.rb
Expand Up @@ -5,12 +5,12 @@ class DeprecationIO
def initialize
@io = $stderr
@count = 0
@filename = 'STD_ERR'
@description = 'STD_ERR'
end
attr_reader :io, :filename
attr_reader :io, :description

def set_output(filename)
@filename = filename
@description = filename
@io = File.open(filename,'w')
end

Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/core/configuration_spec.rb
Expand Up @@ -26,7 +26,7 @@ module RSpec::Core
File.stub(:open)
io = double 'deprecation io'
config.deprecation_io = io
expect(config.deprecation_io.filename).to eq io
expect(config.deprecation_io.description).to eq io
end

it 'is used by warn_deprecation' do
Expand Down
8 changes: 4 additions & 4 deletions spec/rspec/core/deprecation_io_spec.rb
Expand Up @@ -27,8 +27,8 @@ module RSpec::Core
io.puts 'WARN'
end

it 'leaves filename as stderr' do
expect(io.filename).to eq 'STD_ERR'
it 'leaves description as stderr' do
expect(io.description).to eq 'STD_ERR'
end
end

Expand All @@ -54,8 +54,8 @@ module RSpec::Core
io.puts 'WARN'
end

it 'sets filename' do
expect(io.filename).to eq 'filename.txt'
it 'sets description' do
expect(io.description).to eq 'filename.txt'
end

it 'logs to file' do
Expand Down

0 comments on commit 6e05d1b

Please sign in to comment.