summaryrefslogtreecommitdiff
path: root/vendor/plugins/globalize2/test/test_helper.rb
diff options
context:
space:
mode:
authorhukl <hukl@eight.local>2009-02-07 15:50:40 +0100
committerhukl <hukl@eight.local>2009-02-07 15:50:40 +0100
commit36a2f1f3c085dd81171cf7d8220770d4ff921ab3 (patch)
tree5ded15331b192bf428af4c94d46d1abb28ef0690 /vendor/plugins/globalize2/test/test_helper.rb
parentce9645d0092d42c7bf8781378181ffbd4ff3d088 (diff)
added globalize2 plugin as well as some modifications
which use the new translation facilities. backend mostly.
Diffstat (limited to 'vendor/plugins/globalize2/test/test_helper.rb')
-rw-r--r--vendor/plugins/globalize2/test/test_helper.rb26
1 files changed, 26 insertions, 0 deletions
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 @@
1require 'rubygems'
2require 'test/unit'
3require 'active_support'
4require 'active_support/test_case'
5require 'mocha'
6
7$LOAD_PATH << File.expand_path( File.dirname(__FILE__) + '/../lib' )
8
9class ActiveSupport::TestCase
10 def reset_db!( schema = 'schema' )
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 File.expand_path(File.join(File.dirname(__FILE__), 'data', schema + '.rb'))
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
26end \ No newline at end of file