Fix "@disable_warnings" spec warning (#416)
When running rspec specs on the ruby-grape project with warnings enabled this warning is printed hundreds of times. This change fixes the warning. Also, turn on warnings when running rspec to see when this happens.
This commit is contained in:
parent
846ce0de72
commit
9f965feb37
|
@ -36,6 +36,7 @@ scheme are considered to be bugs.
|
|||
|
||||
### Miscellaneous
|
||||
|
||||
* [#416](https://github.com/intridea/hashie/pull/416): Fix `warning: instance variable @disable_warnings not initialized` - [@axfcampos](https://github.com/axfcampos).
|
||||
* Your contribution here.
|
||||
|
||||
## [3.5.5] - 2017-02-24
|
||||
|
|
|
@ -83,7 +83,7 @@ module Hashie
|
|||
# @api semipublic
|
||||
# @return [Boolean]
|
||||
def self.disable_warnings?
|
||||
!!@disable_warnings
|
||||
@disable_warnings ||= false
|
||||
end
|
||||
|
||||
# Inheritance hook that sets class configuration when inherited.
|
||||
|
|
|
@ -19,4 +19,5 @@ RSpec.configure do |config|
|
|||
config.expect_with :rspec do |expect|
|
||||
expect.syntax = :expect
|
||||
end
|
||||
config.warnings = true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue