Skip to content

Commit

Permalink
with_deprecation_silenced now remembers previous state, rather than a…
Browse files Browse the repository at this point in the history
…ssuming it was true
  • Loading branch information
justinfrench committed Jan 9, 2011
1 parent 1614ebd commit adfd744
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/support/deprecation.rb
@@ -1,6 +1,7 @@
def with_deprecation_silenced(&block)
previous_value = ::ActiveSupport::Deprecation.silenced
::ActiveSupport::Deprecation.silenced = true
yield
::ActiveSupport::Deprecation.silenced = false
::ActiveSupport::Deprecation.silenced = previous_value
end

0 comments on commit adfd744

Please sign in to comment.