]> git.openstreetmap.org Git - rails.git/blob - vendor/plugins/globalize2/test/test_helper.rb
Add Globalize2 so that we get some nice fall backs to other languages when a translat...
[rails.git] / vendor / plugins / globalize2 / test / test_helper.rb
1 require 'rubygems'
2 require 'test/unit'
3 require 'active_support'
4 require 'active_support/test_case'
5 require 'mocha'
6
7 $LOAD_PATH << File.expand_path( File.dirname(__FILE__) + '/../lib' )
8
9 class ActiveSupport::TestCase
10   def reset_db!( schema_path )
11     ::ActiveRecord::Migration.verbose = false   # Quiet down the migration engine
12     ::ActiveRecord::Base.establish_connection({
13       :adapter => 'sqlite3',
14       :dbfile => ':memory:'
15     })
16     ::ActiveRecord::Base.silence do
17       load schema_path
18     end
19   end
20   
21   def assert_member(item, arr)
22     assert_block "Item #{item} is not in array #{arr}" do
23       arr.member? item
24     end
25   end
26 end