title: Why can't I change the current locale when testing Rails 3?
body: <p>I have a multilingual application and I am trying to write some tests for one of my controllers. However, it seems that I cannot change the current locale in testing. It works ok in development. Assume that my test is as follows:</p>
  
  <pre><code>test "do something has to be done correctly" do
    I18n.locale = :cn # set current locale to chinese
    assert_equal :cn, I18n.locale
  end
  </code></pre>
  
  <p>This test fails with error:</p>
  
  <pre><code>&lt;:cn&gt; expected but was
  &lt;:en&gt;.
  </code></pre>
  
  <p><code>:en</code> is the default locale in my configuration.</p>
  
  <p>Has anybody encountered this problem in Rails 3 before? Any solution found?</p>