title: How can I mute Rails 3 deprecation warnings selectively?
body: <p>I am upgrading a Rails 2 to Rails 3 application (code not written by me).
  The (well tested code) uses shoulda and Test::Unit, and extensively uses the macros should_create and should_change.</p>
  
  <p>I understand from <a href="http://robots.thoughtbot.com/post/731871832/this-should-change-your-mind" rel="nofollow noreferrer">this discussion</a> that the shoulda maintainers want to get rid of both methods but that people using Test::Unit don't find it necessary (not sure I am grasping the whole discussion though).</p>
  
  <p>Anaway, is there a way to selectively turn of the deprecation warnings for specified macros?  I already know from <a href="https://stackoverflow.com/questions/2689377/silencing-deprecation-warnings-in-rails-3">this posting</a> that you can turn off the deprecation warnings in the Rake test output entirely by setting:</p>
  
  <pre><code>ActiveSupport::Deprecation.silenced = true
  </code></pre>
  
  <p>in your the test environment file and I also know that you can put specific pieces of code in a block to get them silenced:</p>
  
  <pre><code>ActiveSupport::Deprecation.silence do
  # no warnings for any use of deprecated methods here
  end
  </code></pre>
  
  <p>The latter is an option but would require me to go over all the tests and enclose the should_create macros in such a block.  So I was wondering there was a way to eliminate warnings for specific macros entirely with one configuration setting?</p>