<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -12,7 +12,7 @@ module Waves
 
       def store( key, value )            
         @keys &lt;&lt; key
-        Marshal.dump( value, ::File.new( @directory / key, 'w') ) 
+        ::File.open( @directory / key, 'w') { |f| Marshal.dump( value, f ) }
       end
 
       def delete( key )</diff>
      <filename>lib/caches/file.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,3 @@
-
 module Waves
 
   module Caches</diff>
      <filename>lib/caches/simple.rb</filename>
    </modified>
    <modified>
      <diff>@@ -179,7 +179,6 @@ module Waves
       log :level =&gt; :info, :output =&gt; $stderr
       reloadable []
       dependencies []
-      cache :dir =&gt; 'cache'
       pid &quot;#{$$}.pid&quot;
       server Waves::Servers::WEBrick
       application {</diff>
      <filename>lib/runtime/configuration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,28 +4,27 @@ require 'caches/simple'
 
 module SimpleApp ; include Waves::Foundations::Compact ; end
 
-describe &quot;Waves.cache&quot; do
-  it &quot;Takes a cache object as its argument&quot; do
-    Waves.cache Waves::Caches::Simple.new
-  end
-end
-
 describe &quot;Waves::Caches::Simple&quot; do
+  
+  before do
+    @cache = Waves::Caches::Simple.new
+  end
+  
   it &quot;can store and fetch, including implementation-wide methods&quot; do
-    Waves.cache.store :frog, &quot;hopping&quot;
-    Waves.cache[:ball] = &quot;dropping&quot;
+    @cache.store :frog, &quot;hopping&quot;
+    @cache[:ball] = &quot;dropping&quot;
         
-    Waves.cache[:frog].should.==(&quot;hopping&quot;) and Waves.cache.fetch(:ball).should.==(&quot;dropping&quot;)
+    @cache[:frog].should.==(&quot;hopping&quot;) and @cache.fetch(:ball).should.==(&quot;dropping&quot;)
   end
 
   it &quot;can delete and clear&quot; do
-    Waves.cache.delete :frog
-    Waves.cache.fetch(:frog).should == nil
+    @cache.delete :frog
+    @cache.fetch(:frog).should == nil
     
-    Waves.cache.store :gravy, &quot;bowl&quot;
-    Waves.cache.fetch(:gravy).should.not.==(nil) and Waves.cache[:ball].should.not.==(nil)
+    @cache.store :gravy, &quot;bowl&quot;
+    @cache.fetch(:gravy).should.not.==(nil) and @cache[:ball].should.not.==(nil)
     
-    Waves.cache.clear   
-    Waves.cache.fetch(:frog).should.==(nil) and Waves.cache[:ball].should.==(nil)
+    @cache.clear   
+    @cache.fetch(:frog).should.==(nil) and @cache[:ball].should.==(nil)
   end
 end</diff>
      <filename>verify/specs/caches/simple.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,35 +5,35 @@ require 'caches/file'
 
 module SimpleApp ; include Waves::Foundations::Compact ; end
 
-describe &quot;can assign a Waves::Caches::File object to Waves.cache&quot; do
-  module SimpleApp
-    
-    Waves.cache Waves::Caches::File.new( :directory =&gt; '/tmp/testeroni') 
+describe &quot;Waves::Caches::File&quot; do
+  
+  before do
+    @cache = Waves::Caches::File.new( :directory =&gt; '/tmp') 
   end
-end
-
-describe &quot;can store and fetch, including implementation-wide methods&quot; do
-  module SimpleApp
-    Waves.cache.store :frog, &quot;hopping&quot;
-    Waves.cache[:ball] = &quot;dropping&quot;
+  
+  it &quot;can store and fetch, including implementation-wide methods&quot; do
+    @cache.store :frog, &quot;hopping&quot;
+    @cache[:ball] = &quot;dropping&quot;
         
-    Waves.cache[:frog].should.==(&quot;hopping&quot;) and Waves.cache.fetch(:ball).should.==(&quot;dropping&quot;)
+    @cache[:frog].should.==(&quot;hopping&quot;)
+    @cache.fetch(:ball).should.==(&quot;dropping&quot;)
   end
-end
 
-describe &quot;can delete and clear&quot; do
-  module SimpleApp
-    Waves.cache.delete :frog
-    Waves.cache.fetch(:frog).should == nil
+  it &quot;can delete and clear&quot; do
+    @cache.store :frog, &quot;hopping&quot;
+    @cache.delete :frog
+    @cache.fetch(:frog).should == nil
+    
+    @cache.delete(:monkey)
     
-    Waves.cache.store :gravy, &quot;bowl&quot;
-    Waves.cache.fetch(:gravy).should.not.==(nil) and Waves.cache[:ball].should.not.==(nil)
+    @cache.store :gravy, &quot;bowl&quot;
+    @cache.fetch(:gravy).should.not.==(nil) and @cache[:ball].should.not.==(nil)
     
-    Waves.cache.clear   
-    Waves.cache.fetch(:frog).should.==(nil) and Waves.cache[:ball].should.==(nil)
+    @cache.clear   
+    @cache.fetch(:frog).should.==(nil) and @cache[:ball].should.==(nil)
     
     %w( :frog, :ball, :gravy, 'giving' ).each do |key|
-      File.exist?('/tmp/testeroni' + key).should == nil
+      File.exist?('/tmp/testeroni' + key).should == false
     end
   end
 end</diff>
      <filename>verify/tests/caches/file.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>168eb78da2b062ff42ca6618bd226ad8d3dd0563</id>
    </parent>
  </parents>
  <author>
    <name>Matthew King</name>
    <email>automatthew@gmail.com</email>
  </author>
  <url>http://github.com/dyoder/waves/commit/4d1bcbdbb0bb372efe370a2c04c01078ecb56142</url>
  <id>4d1bcbdbb0bb372efe370a2c04c01078ecb56142</id>
  <committed-date>2008-10-20T11:45:39-07:00</committed-date>
  <authored-date>2008-10-20T11:45:39-07:00</authored-date>
  <message>using File.open with block for File cache dumping; spec squeezing.</message>
  <tree>d383bfbda3ba154662e600ba537973ae2c86a3d6</tree>
  <committer>
    <name>Matthew King</name>
    <email>automatthew@gmail.com</email>
  </committer>
</commit>
