<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -21,6 +21,7 @@ context &quot;Sessions&quot; do
 
   specify &quot;should be able to store data accross requests&quot; do
     set_option :sessions, true
+    set_option :environment, :not_test # necessary because sessions are disabled
 
     get '/foo' do
       session[:test] = true
@@ -34,6 +35,8 @@ context &quot;Sessions&quot; do
     get_it '/foo', :env =&gt; { :host =&gt; 'foo.sinatrarb.com' }
     assert ok?
     assert include?('Set-Cookie')
+
+    set_option :environment, :test
   end
 
 end</diff>
      <filename>compat/sessions_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -776,7 +776,7 @@ module Sinatra
       # an instance of the class new was called on.
       def new(*args, &amp;bk)
         builder = Rack::Builder.new
-        builder.use Rack::Session::Cookie if sessions?
+        builder.use Rack::Session::Cookie if sessions? &amp;&amp; !test?
         builder.use Rack::CommonLogger if logging?
         builder.use Rack::MethodOverride if methodoverride?
         @middleware.each { |c, args, bk| builder.use(c, *args, &amp;bk) }</diff>
      <filename>lib/sinatra/base.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8edb40963c1386b5f368cd4b79d995733a77b881</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Tomayko</name>
    <email>rtomayko@gmail.com</email>
  </author>
  <url>http://github.com/bmizerany/sinatra/commit/08b142b4cc5501277b74ece88b1edfae3e239348</url>
  <id>08b142b4cc5501277b74ece88b1edfae3e239348</id>
  <committed-date>2009-02-26T22:48:46-08:00</committed-date>
  <authored-date>2009-02-26T22:47:05-08:00</authored-date>
  <message>Never use Session middleware in test environment [#119]</message>
  <tree>3b411c0acd971681f6208d000b186092c9b4c34c</tree>
  <committer>
    <name>Ryan Tomayko</name>
    <email>rtomayko@gmail.com</email>
  </committer>
</commit>
