Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

User Kernel#warn instead of $stderr.puts for deprecation messages.

  • Loading branch information...
commit aa22f389ec98b419b6e8afb856af17c5d1bc2ed4 1 parent fe8fa8e
@bblimke authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/webmock/deprecation.rb
  2. +1 −1  lib/webmock/webmock.rb
View
2  lib/webmock/deprecation.rb
@@ -2,7 +2,7 @@ module WebMock
class Deprecation
class << self
def warning(message)
- $stderr.puts "WebMock deprecation warning: #{message}"
+ warn "WebMock deprecation warning: #{message}"
end
end
end
View
2  lib/webmock/webmock.rb
@@ -3,7 +3,7 @@ module WebMock
def self.included(clazz)
WebMock::Deprecation.warning("include WebMock is deprecated. Please include WebMock::API instead")
if clazz.instance_methods.map(&:to_s).include?('request')
- $stderr.puts "WebMock#request was not included in #{clazz} to avoid name collision"
+ warn "WebMock#request was not included in #{clazz} to avoid name collision"
else
clazz.class_eval do
def request(method, uri)
Please sign in to comment.
Something went wrong with that request. Please try again.