summaryrefslogtreecommitdiff
path: root/spec/mspec/lib/mspec/utils/warnings.rb
blob: 23efc696a553b4a69a31104f3a2e8fbc19cef4d8 (plain)
1
2
3
4
5
6
7
8
9
10
require 'mspec/guards/version'

# Always enable deprecation warnings when running MSpec, as ruby/spec tests for them,
# and like in most test frameworks, deprecation warnings should be enabled by default,
# so that deprecations are noticed before the breaking change.
# Disable experimental warnings, we want to test new experimental features in ruby/spec.
if Object.const_defined?(:Warning) and Warning.respond_to?(:[]=)
  Warning[:deprecated] = true
  Warning[:experimental] = false
end