<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -41,7 +41,7 @@ protected
   end
 
   def allow_login_bypass?
-    [&quot;development&quot;, &quot;test&quot;].include?(RAILS_ENV)
+    %w(development test).include?(Rails.env)
   end
   helper_method :allow_login_bypass?
 end</diff>
      <filename>app/controllers/admin/sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -40,13 +40,9 @@ describe Admin::SessionsController do
 
   describe '#allow_login_bypass? when RAILS_ENV == production' do
     it 'returns false' do
-      silence_warnings { RAILS_ENV = 'production' }
+      ::Rails.stub!(:env).and_return('production')
       @controller.send(:allow_login_bypass?).should == false
     end
-
-    after do
-      silence_warnings { RAILS_ENV = 'test' }
-    end
   end
 end
 </diff>
      <filename>spec/controllers/admin/sessions_controller_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>51ea9310877a80f403f7bdd2c8b3ee4f1788b30e</id>
    </parent>
  </parents>
  <author>
    <name>Xavier Shay</name>
    <email>xavier@rhnh.net</email>
  </author>
  <url>http://github.com/xaviershay/enki/commit/9db7db18a2efebb67d48a0f05815ce67d54f1446</url>
  <id>9db7db18a2efebb67d48a0f05815ce67d54f1446</id>
  <committed-date>2009-10-27T19:11:36-07:00</committed-date>
  <authored-date>2009-10-27T19:11:36-07:00</authored-date>
  <message>[ruby19] Fix Rails.env stubbing (thanks Adam Collins)</message>
  <tree>aa5ab40cc5c972dc586f18291c2425ce74662b36</tree>
  <committer>
    <name>Xavier Shay</name>
    <email>xavier@rhnh.net</email>
  </committer>
</commit>
