X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6ba51da46e41f2cf9260ef8e0b74a933ae82a362..283a3e9ba97bfcf86541d079f85da7791c74f3ba:/vendor/plugins/globalize2/test/test_helper.rb diff --git a/vendor/plugins/globalize2/test/test_helper.rb b/vendor/plugins/globalize2/test/test_helper.rb new file mode 100644 index 000000000..956b352fe --- /dev/null +++ b/vendor/plugins/globalize2/test/test_helper.rb @@ -0,0 +1,26 @@ +require 'rubygems' +require 'test/unit' +require 'active_support' +require 'active_support/test_case' +require 'mocha' + +$LOAD_PATH << File.expand_path( File.dirname(__FILE__) + '/../lib' ) + +class ActiveSupport::TestCase + def reset_db!( schema_path ) + ::ActiveRecord::Migration.verbose = false # Quiet down the migration engine + ::ActiveRecord::Base.establish_connection({ + :adapter => 'sqlite3', + :dbfile => ':memory:' + }) + ::ActiveRecord::Base.silence do + load schema_path + end + end + + def assert_member(item, arr) + assert_block "Item #{item} is not in array #{arr}" do + arr.member? item + end + end +end \ No newline at end of file