15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/deprecation/rspec.rb', line 15
def self.report io
return if Deprecation.deprecations.empty?
io.puts "\n\n==== DEPRECATION WARNINGS ===="
Deprecation.deprecations.each do |hash, obj|
io.puts(obj[:message] + " (#{obj[:count]} times); e.g.: ")
io.puts(" " + obj[:callstack][0..4].join("\n ") + "\n\n")
end
io.puts <<-EOF
If you need more of the backtrace for any of these deprecations to identify
where to make the necessary changes, you can configure
`Deprecation.default_deprecation_behavior = :raise`, and it will turn the deprecation
warnings into errors, giving you the full backtrace.
EOF
io.puts "\n\n========\n\n"
end
|