use jdbc for activerecord if running under jruby

This commit is contained in:
Darrin Holst 2010-02-17 14:48:43 -06:00
parent 43c5a2dd88
commit e096c35023
2 changed files with 3 additions and 3 deletions

View file

@ -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|

View file

@ -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