<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -7,50 +7,55 @@ 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
+      if obj.is_a?(Store) 
+        begin
+          obj.stop_autosync! 
+        rescue Exception
+        end
+      end
     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>f1c717512dd43956ca4bfca09b8d3da905ca1013</id>
    </parent>
  </parents>
  <author>
    <name>Yurii Rashkovskii</name>
    <email>yrashk@idbns.com</email>
  </author>
  <url>http://github.com/yrashk/strokedb/commit/2c3a8d36ec7157a7c92e096bcaaf0269f96d1519</url>
  <id>2c3a8d36ec7157a7c92e096bcaaf0269f96d1519</id>
  <committed-date>2008-05-24T13:29:20-07:00</committed-date>
  <authored-date>2008-05-24T13:29:20-07:00</authored-date>
  <message>Minor spec_helper improvement</message>
  <tree>abb1f1361d4ff202867edcd62e7bb843da5d56c2</tree>
  <committer>
    <name>Yurii Rashkovskii</name>
    <email>yrashk@idbns.com</email>
  </committer>
</commit>
