From 36a2f1f3c085dd81171cf7d8220770d4ff921ab3 Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 7 Feb 2009 15:50:40 +0100 Subject: added globalize2 plugin as well as some modifications which use the new translation facilities. backend mostly. --- vendor/plugins/globalize2/test/test_helper.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 vendor/plugins/globalize2/test/test_helper.rb (limited to '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 00000000..58b047d6 --- /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 = 'schema' ) + ::ActiveRecord::Migration.verbose = false # Quiet down the migration engine + ::ActiveRecord::Base.establish_connection({ + :adapter => 'sqlite3', + :dbfile => ':memory:' + }) + ::ActiveRecord::Base.silence do + load File.expand_path(File.join(File.dirname(__FILE__), 'data', schema + '.rb')) + 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 -- cgit v1.3