Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Default to jdbc memory database in sqlite specs if running on jruby

  • Loading branch information...
commit 90d084dda3fbfa807a5841cb60ab0bf5fd859dff 1 parent 69c1991
@jeremyevans authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 spec/adapters/sqlite_spec.rb
View
8 spec/adapters/sqlite_spec.rb
@@ -1,7 +1,13 @@
require File.join(File.dirname(File.expand_path(__FILE__)), 'spec_helper.rb')
unless defined?(SQLITE_DB)
- SQLITE_URL = 'sqlite:/' unless defined? SQLITE_URL
+ unless defined? SQLITE_URL
+ if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
+ SQLITE_URL = 'jdbc:sqlite::memory:'
+ else
+ SQLITE_URL = 'sqlite:/'
+ end
+ end
SQLITE_DB = Sequel.connect(ENV['SEQUEL_SQLITE_SPEC_DB']||SQLITE_URL)
end
INTEGRATION_DB = SQLITE_DB unless defined?(INTEGRATION_DB)
Please sign in to comment.
Something went wrong with that request. Please try again.