Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test works with jruby.

  • Loading branch information...
commit c8d40bd935118f76e4adb51aed9553f4f8517ff5 1 parent 062a80b
Masao Mutoh authored
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
2  test/Rakefile
@@ -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
7 test/db/sqlite.rb
@@ -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
2  test/helper.rb
@@ -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 "."
Please sign in to comment.
Something went wrong with that request. Please try again.