test/test_helper.rb in cachetastic-1.7.4 vs test/test_helper.rb in cachetastic-2.0.0
- old
+ new
@@ -1,16 +1,15 @@
require "test/unit"
require File.join(File.dirname(__FILE__), "..", "lib", "cachetastic")
require 'rubygems'
-require 'mack_ruby_core_extensions'
+require 'mack-facets'
require 'active_record'
-require 'data_mapper'
# place common methods, assertions, and other type things in this file so
# other tests will have access to them.
-app_config.load_file(File.join(File.dirname(__FILE__), "config.yml"))
+require File.join(File.dirname(__FILE__), "config")
class MyTempOptionsCache < Cachetastic::Caches::Base
end
class YourTempOptionsCache < Cachetastic::Caches::Base
@@ -35,11 +34,17 @@
end
end # get
end # self
end # AlbumCache
+class YoungMcCache < Cachetastic::Caches::Base
+end
+class DrBobCache < Cachetastic::Caches::Base
+end
+
+
#---- AR:
AR_DB = File.join(Dir.pwd, "ar_test.db")
puts "AR_DB: #{AR_DB}"
ActiveRecord::Base.establish_connection({:adapter => "sqlite3", :database => AR_DB})
@@ -66,25 +71,6 @@
end
def self.down
drop_table :ar_songs
drop_table :ar_albums
end
-end
-
-#---- DB:
-DM_DB = File.join(File.dirname(__FILE__), "dm_test.db")
-DataMapper::Database.setup({:adapter => "sqlite3", :database => DM_DB})
-
-class DmAlbum < DataMapper::Base
- property :title, :string
- property :artist, :string
- def some_numbers(arr)
- cacher(:some_numbers) do
- arr << :yippie
- end
- end
-end
-
-class DmSong < DataMapper::Base
- property :title, :string
- property :album_id, :integer
end
\ No newline at end of file