<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,52 +7,50 @@ TEMP_DIR = SPEC_ROOT + '/temp'
 TEMP_STORAGES = TEMP_DIR + '/storages'
 
 def setup_default_store(store=nil)
-  if store
-    StrokeDB.stub!(:default_store).and_return(store)
-    return store
-  end
-  @path = TEMP_STORAGES
-  FileUtils.rm_rf @path
+if store
+  StrokeDB.stub!(:default_store).and_return(store)
+  return store
+end
+@path = TEMP_STORAGES
+FileUtils.rm_rf @path
 
-  @storage = if ENV['STORAGE'].to_s.downcase == 'file'
-    StrokeDB::FileStorage.new(:path =&gt; @path + '/file_storage')
-  else
-    StrokeDB::MemoryStorage.new
-  end
+@storage = if ENV['STORAGE'].to_s.downcase == 'file'
+  StrokeDB::FileStorage.new(:path =&gt; @path + '/file_storage')
+else
+  StrokeDB::MemoryStorage.new
+end
 
-  $store = StrokeDB::Store.new(:storage =&gt; @storage,:index =&gt; @index, :path =&gt; @path)
-  StrokeDB.stub!(:default_store).and_return($store)
-  StrokeDB.default_store
+$store = StrokeDB::Store.new(:storage =&gt; @storage,:index =&gt; @index, :path =&gt; @path)
+StrokeDB.stub!(:default_store).and_return($store)
+StrokeDB.default_store
 end
 
 def stub_meta_in_store(store=nil)
-  store ||= StrokeDB.default_store
-  meta = store.find(NIL_UUID)
-  store.should_receive(:find).with(NIL_UUID).any_number_of_times.and_return(meta)
-  store.should_receive(:include?).with(NIL_UUID).any_number_of_times.and_return(true)
+store ||= StrokeDB.default_store
+meta = store.find(NIL_UUID)
+store.should_receive(:find).with(NIL_UUID).any_number_of_times.and_return(meta)
+store.should_receive(:include?).with(NIL_UUID).any_number_of_times.and_return(true)
 end
 
 def setup_index(store=nil)
-  store ||= StrokeDB.default_store
-  index_storage = StrokeDB::InvertedListFileStorage.new(:path =&gt; TEMP_STORAGES + '/inverted_list_storage')
-  index_storage.clear!
-  @index = StrokeDB::InvertedListIndex.new(index_storage)
-  @index.document_store = store
-  store.index_store = @index
-  @index
+store ||= StrokeDB.default_store
+index_storage = StrokeDB::InvertedListFileStorage.new(:path =&gt; TEMP_STORAGES + '/inverted_list_storage')
+index_storage.clear!
+@index = StrokeDB::InvertedListIndex.new(index_storage)
+@index.document_store = store
+store.index_store = @index
+@index
 end
 
 Spec::Runner.configure do |config|
-  config.after(:all) do
+config.after(:all) do
+  
+    ObjectSpace.each_object do |obj|
+      obj.stop_autosync! if obj.is_a?(Store) rescue nil
+    end
     
-    if ENV['STORAGE'].to_s.downcase == 'file'
-      ObjectSpace.each_object do |obj|
-        obj.stop_autosync! if obj.is_a?(Store)
-      end
-      
-      ObjectSpace.each_object do |obj|
-        obj.close if obj.is_a?(::File) rescue nil
-      end
+    ObjectSpace.each_object do |obj|
+      obj.close if obj.is_a?(::File) rescue nil
     end
-  end
+end
 end
\ No newline at end of file</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6cc664d6f6150143153892a431cd831e814e44bf</id>
    </parent>
  </parents>
  <author>
    <name>Yurii Rashkovskii</name>
    <email>yrashk@idbns.com</email>
  </author>
  <url>http://github.com/yrashk/strokedb/commit/03795003ae925546efc24a45b3bb5047d76b6c36</url>
  <id>03795003ae925546efc24a45b3bb5047d76b6c36</id>
  <committed-date>2008-05-24T13:01:17-07:00</committed-date>
  <authored-date>2008-05-24T13:01:17-07:00</authored-date>
  <message>autosync/close files in specs even for mem storage</message>
  <tree>35d212e8ecc77647b43d13cad068e4d246a2a350</tree>
  <committer>
    <name>Yurii Rashkovskii</name>
    <email>yrashk@idbns.com</email>
  </committer>
</commit>
