<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>log/test.log</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -16,4 +16,6 @@ or
     end
     =&gt; &quot;SELECT * FROM posts&quot;
     
-But I'm sure a smart cookie / muffin such as you already knew that.
\ No newline at end of file
+But I'm sure a smart cookie / muffin such as you already knew that.
+
+These methods can be called in models, controllers, helpers, views and external libraries.
\ No newline at end of file</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@ require 'spec/fixtures/models'
 require 'spec/test_helper'
 
 FileUtils.mkdir_p &quot;#{Dir.pwd}/tmp&quot;
-ActiveRecord::Base.logger = Logger.new(&quot;tmp/fucker&quot;)
+ActiveRecord::Base.logger = Logger.new(&quot;tmp/#{RAILS_ENV}.log&quot;)
 
 Spec::Runner.configure do |config|  
   </diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,4 +20,19 @@ describe Post do
     end.should eql(&quot;SELECT * FROM \&quot;posts\&quot; WHERE (\&quot;posts\&quot;.\&quot;created_at\&quot; = '2008-01-01 00:00:00') LIMIT 1\nSELECT \&quot;tags\&quot;.*, t0.post_id as the_parent_record_id FROM \&quot;tags\&quot; INNER JOIN \&quot;posts_tags\&quot; t0 ON \&quot;tags\&quot;.id = t0.tag_id WHERE (t0.post_id = 82)&quot;)
   end
   
+  it &quot;should be able to display the SQL of a multi model find call, with conditions on the join&quot; do
+    Post.sql do
+      p = Post.find(:first, :conditions =&gt; [&quot;created_at = ? AND tags.name = ?&quot;, Time.local(Time.now.year-1, 1, 1), &quot;ruby&quot;], :include =&gt; :tags)
+    end.should eql(&quot;SELECT DISTINCT \&quot;posts\&quot;.id FROM \&quot;posts\&quot; LEFT OUTER JOIN \&quot;posts_tags\&quot; ON \&quot;posts_tags\&quot;.post_id = \&quot;posts\&quot;.id LEFT OUTER JOIN \&quot;tags\&quot; ON \&quot;tags\&quot;.id = \&quot;posts_tags\&quot;.tag_id WHERE (created_at = '2008-01-01 00:00:00' AND tags.name = 'ruby') LIMIT 1\nSELECT \&quot;posts\&quot;.\&quot;id\&quot; AS t0_r0, \&quot;posts\&quot;.\&quot;text\&quot; AS t0_r1, \&quot;posts\&quot;.\&quot;created_at\&quot; AS t0_r2, \&quot;posts\&quot;.\&quot;user_id\&quot; AS t0_r3, \&quot;tags\&quot;.\&quot;id\&quot; AS t1_r0, \&quot;tags\&quot;.\&quot;name\&quot; AS t1_r1 FROM \&quot;posts\&quot; LEFT OUTER JOIN \&quot;posts_tags\&quot; ON \&quot;posts_tags\&quot;.post_id = \&quot;posts\&quot;.id LEFT OUTER JOIN \&quot;tags\&quot; ON \&quot;tags\&quot;.id = \&quot;posts_tags\&quot;.tag_id WHERE (created_at = '2008-01-01 00:00:00' AND tags.name = 'ruby') AND \&quot;posts\&quot;.id IN (82)&quot;)
+  end
+  
+  it &quot;should revert the logger&quot; do
+    Post.sql do
+      Post.count
+    end 
+    ActiveRecord::Base.logger.send(:instance_variable_get, :@logdev).send(:instance_variable_get, :@filename).should eql(&quot;tmp/#{RAILS_ENV}.log&quot;)
+  end
+  
+  
+  
 end
\ No newline at end of file</diff>
      <filename>spec/unit/sql_display_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fc9e87a820741dfb186f2b0a38054f36b28aa7f9</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Bigg</name>
    <email>radarlistener@gmail.com</email>
  </author>
  <url>http://github.com/radar/sql_display/commit/353300405aa7ede3b737b676313504316b47a4e8</url>
  <id>353300405aa7ede3b737b676313504316b47a4e8</id>
  <committed-date>2009-06-11T01:00:59-07:00</committed-date>
  <authored-date>2009-06-11T01:00:59-07:00</authored-date>
  <message>Write test to ensure hat it reverts the logger</message>
  <tree>f04cc2613e598d45d1215059c3b6eb7182f9e5f0</tree>
  <committer>
    <name>Ryan Bigg</name>
    <email>radarlistener@gmail.com</email>
  </committer>
</commit>
