Permalink
Browse files

test works with jruby.

  • Loading branch information...
Masao Mutoh
Masao Mutoh committed May 5, 2009
1 parent 062a80b commit c8d40bd935118f76e4adb51aed9553f4f8517ff5
Showing with 8 additions and 3 deletions.
  1. +1 −1 test/Rakefile
  2. +6 −1 test/db/sqlite.rb
  3. +1 −1 test/helper.rb
View
@@ -38,6 +38,6 @@ end
desc 'Run all tests'
task :test do
Dir.glob("test_*.rb").each do |path|
- ruby "-I../lib", "-I#{gettext_path}", "-rubygems", path rescue nil
+ ruby "-I../lib:../../locale/lib", "-I#{gettext_path}", "-rubygems", path rescue nil
end
end
View
@@ -1,6 +1,11 @@
#create a connection
+if /java/ =~ RUBY_PLATFORM
+ adapter = "jdbcsqlite3"
+else
+ adapter = "sqlite3"
+end
ActiveRecord::Base.configurations = {"test" => {
- :adapter => "sqlite3",
+ :adapter => adapter,
:database => ":memory:"
}.with_indifferent_access}
View
@@ -1,6 +1,6 @@
# encoding: utf-8
-unless RUBY_VERSION > "1.9.0"
+unless RUBY_VERSION >= "1.9.0"
$KCODE = "UTF8"
end
$LOAD_PATH.unshift "."

0 comments on commit c8d40bd

Please sign in to comment.