Permalink
Browse files

Run auto_migrate to clear the cache during specs. Give randomly named…

… test caches a .cache suffix so we can .gitignore them
  • Loading branch information...
1 parent d056359 commit d1e4730ecd5cbb508b4761ea2903d769f858872b @lance lance committed Nov 3, 2011
Showing with 5 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 gems/cache/spec/cache_spec.rb
  3. +2 −1 gems/cache/spec/dm-infinispan-adapter_spec.rb
View
@@ -27,3 +27,4 @@ Gemfile.lock
Infinispan-FileCacheStore
rubyObj.*
schema.rb
+*.cache
@@ -233,8 +233,8 @@
describe "with persistence" do
before(:all) do
@default_dir = File.join(File.dirname(__FILE__), '..', 'Infinispan-FileCacheStore')
- @configured_dir = File.join( File.dirname(__FILE__), '..', random_string )
- @date_cfg_dir = File.join( File.dirname(__FILE__), '..', random_string )
+ @configured_dir = File.join( File.dirname(__FILE__), '..', random_string + ".cache" )
+ @date_cfg_dir = File.join( File.dirname(__FILE__), '..', random_string + ".cache" )
@index_dir = File.join( File.dirname(__FILE__), '..', 'java.util.HashMap' )
FileUtils.mkdir @configured_dir
FileUtils.mkdir @date_cfg_dir
@@ -143,6 +143,7 @@ class ::Heffalump
describe 'query matching' do
before :all do
+ Heffalump.auto_migrate!
@red = Heffalump.create(:color => 'red')
@two = Heffalump.create(:num_spots => 2)
@five = Heffalump.create(:num_spots => 5)
@@ -321,7 +322,7 @@ class ::Heffalump
describe "with persistence" do
before :all do
- @configured_dir = File.join( File.dirname(__FILE__), '..', random_string )
+ @configured_dir = File.join( File.dirname(__FILE__), '..', random_string + ".cache" )
@default_dir = File.join(File.dirname(__FILE__), '..', 'Infinispan-FileCacheStore')
@snuffy = File.join( File.dirname(__FILE__), '..', 'rubyobj.Snuffleupagus' )
FileUtils.mkdir( @configured_dir )

0 comments on commit d1e4730

Please sign in to comment.