<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,7 +3,7 @@ require 'stringio'
 
 class SubversionTest &lt; Test::Unit::TestCase
   include FileSandbox
-  
+
   def teardown
     FileUtils.rm_f &quot;./svn.err&quot;
   end
@@ -33,9 +33,9 @@ class SubversionTest &lt; Test::Unit::TestCase
   EOF
 
   def test_options
-    svn = Subversion.new(:url =&gt; &quot;file://foo&quot;, 
-                         :username =&gt; &quot;bob&quot;, 
-                         :password =&gt; 'cha', 
+    svn = Subversion.new(:url =&gt; &quot;file://foo&quot;,
+                         :username =&gt; &quot;bob&quot;,
+                         :password =&gt; 'cha',
                          :path =&gt; &quot;bob&quot;,
                          :error_log =&gt; &quot;bob/svn.err&quot;)
 
@@ -45,7 +45,7 @@ class SubversionTest &lt; Test::Unit::TestCase
     assert_equal(&quot;bob&quot;, svn.path)
     assert_equal(&quot;bob/svn.err&quot;, svn.error_log)
   end
-  
+
   def test_error_log_should_default_to_above_path
     assert_equal(&quot;bob/../svn.err&quot;, Subversion.new(:path =&gt; &quot;bob&quot;).error_log)
     assert_equal(&quot;./../svn.err&quot;, Subversion.new.error_log)
@@ -114,14 +114,14 @@ class SubversionTest &lt; Test::Unit::TestCase
 
     svn.checkout
   end
-  
+
   def test_configure_subversion_not_to_check_externals
     svn = Subversion.new(:check_externals =&gt; false)
     assert_equal false, svn.check_externals
 
     svn = Subversion.new(:check_externals =&gt; true)
     assert_equal true, svn.check_externals
-    
+
     svn.check_externals = false
     assert_equal false, svn.check_externals
   end
@@ -132,7 +132,7 @@ class SubversionTest &lt; Test::Unit::TestCase
 
     svn.checkout(Revision.new(5))
   end
-  
+
   def test_allowing_interaction
     svn = new_subversion(:url =&gt; 'svn://foo.com/', :interactive =&gt; true)
     svn.expects(:svn).with(&quot;co&quot;, [&quot;svn://foo.com/&quot;, &quot;.&quot;])
@@ -148,21 +148,21 @@ class SubversionTest &lt; Test::Unit::TestCase
       Subversion.new(:url =&gt; 'http://foo.com/svn/project', :lollipop =&gt; 'http://foo.com/svn/project')
     end
   end
-  
+
   def test_clean_checkout
     in_sandbox do
       @sandbox.new :file =&gt; 'project/something.rb'
       assert File.directory?(&quot;project&quot;)
-      
+
       svn = Subversion.new(:url =&gt; 'http://foo.com/svn/project', :path =&gt; &quot;project&quot;)
       svn.expects(:svn).with(&quot;co&quot;, [&quot;http://foo.com/svn/project&quot;, &quot;project&quot;, &quot;--revision&quot;, 5])
 
       svn.clean_checkout(Revision.new(5))
-      
+
       assert !File.directory?(&quot;project&quot;)
-    end    
+    end
   end
-  
+
   def test_output_of_subversion_to_io_stream
     in_sandbox do
       svn = Subversion.new(:url =&gt; 'url')
@@ -172,36 +172,42 @@ class SubversionTest &lt; Test::Unit::TestCase
 
       io = StringIO.new
       svn.clean_checkout(Revision.new(5), io)
-      
+
       assert_equal &quot;hello world\n&quot;, io.string
-    end    
+    end
   end
-  
+
   def test_up_to_date_should_deal_with_different_revisions
-    svn = new_subversion
-    svn.expects(:last_locally_known_revision).returns(Revision.new(1))
-    svn.expects(:latest_revision).returns(Revision.new(4))
-    svn.expects(:revisions_since).with(1).returns([Revision.new(2), Revision.new(4)])
-    assert !svn.up_to_date?(reasons = [])
-    assert_equal [&quot;New revision 4 detected&quot;,
-                  [Revision.new(2), Revision.new(4)]], reasons
+    in_sandbox do
+      svn = new_subversion
+      svn.expects(:last_locally_known_revision).returns(Revision.new(1))
+      svn.expects(:latest_revision).returns(Revision.new(4))
+      svn.expects(:revisions_since).with(1).returns([Revision.new(2), Revision.new(4)])
+      svn.expects(:externals).returns([])
+      assert !svn.up_to_date?(reasons = [])
+      assert_equal [&quot;New revision 4 detected&quot;,
+                    [Revision.new(2), Revision.new(4)]], reasons
+    end
   end
-  
+
   def test_last_locally_known_revision_should_return_zero_if_path_doesnt_exist
     svn = new_subversion :path =&gt; &quot;foo&quot;
-    
+
     assert_equal 0, svn.last_locally_known_revision.number
   end
-  
+
   def test_up_to_date_should_deal_with_same_revisions
-    svn = new_subversion
-    svn.expects(:last_locally_known_revision).returns(Revision.new(1))
-    svn.expects(:latest_revision).returns(Revision.new(1))
-    
-    assert svn.up_to_date?(reasons = [])
-    assert_equal [], reasons
+    in_sandbox do
+      svn = new_subversion
+      svn.expects(:last_locally_known_revision).returns(Revision.new(1))
+      svn.expects(:latest_revision).returns(Revision.new(1))
+      svn.expects(:externals).returns([])
+
+      assert svn.up_to_date?(reasons = [])
+      assert_equal [], reasons
+    end
   end
-    
+
   def test_up_to_date_should_check_externals_and_return_false
     in_sandbox do
       sandbox.new :directory =&gt; &quot;a&quot;</diff>
      <filename>test/unit/subversion_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>57848cbb588b3fc8b86d21b9e09ca89404b49492</id>
    </parent>
  </parents>
  <author>
    <name>alexeyv</name>
    <email>alexeyv@c04ce798-636b-4ca8-9149-0f9336831111</email>
  </author>
  <url>http://github.com/benburkert/cruisecontrolrb/commit/e3ceb25c354da9a436b12d2e508c179ed5609a31</url>
  <id>e3ceb25c354da9a436b12d2e508c179ed5609a31</id>
  <committed-date>2008-04-24T12:40:31-07:00</committed-date>
  <authored-date>2008-04-24T12:40:31-07:00</authored-date>
  <message>Fixing a curious bug in Subversion unit tests, which is not reproducible when you run it in a checked out copy of source

git-svn-id: http://cruisecontrolrb.rubyforge.org/svn/trunk@621 c04ce798-636b-4ca8-9149-0f9336831111</message>
  <tree>20842cef649409745a42879b0694e778ee794632</tree>
  <committer>
    <name>alexeyv</name>
    <email>alexeyv@c04ce798-636b-4ca8-9149-0f9336831111</email>
  </committer>
</commit>
