mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
use jdbc for activerecord if running under jruby
This commit is contained in:
parent
43c5a2dd88
commit
e096c35023
2 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
require 'activerecord'
|
||||
require 'active_record'
|
||||
|
||||
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :dbfile => ":memory:")
|
||||
ActiveRecord::Base.establish_connection(:adapter => "#{"jdbc" if defined?(JRUBY_VERSION)}sqlite3", :database => ":memory:")
|
||||
|
||||
ActiveRecord::Schema.define(:version => 1) do
|
||||
create_table :widgets do |t|
|
||||
|
|
|
@ -11,7 +11,7 @@ When "I run my scenarios that rely on a clean database" do
|
|||
Dir.chdir(full_dir) do
|
||||
ENV['ORM'] = @orm.downcase
|
||||
ENV['STRATEGY'] = @strategy
|
||||
@out = `cucumber features`
|
||||
@out = `#{"jruby -S " if defined?(JRUBY_VERSION)}cucumber features`
|
||||
@status = $?.exitstatus
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue