spec/spec_helper.rb in with_model-0.2.4 vs spec/spec_helper.rb in with_model-0.2.5

- old
+ new

@@ -11,12 +11,15 @@ Spec::Runner.configure do |config| config.extend WithModel end end +jruby = RUBY_PLATFORM =~ /\bjava\b/ +adapter = jruby ? "jdbcsqlite3" : "sqlite3" + # WithModel requires ActiveRecord::Base.connection to be established. # If ActiveRecord already has a connection, as in a Rails app, this is unnecessary. -ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ":memory:") +ActiveRecord::Base.establish_connection(:adapter => adapter, :database => ":memory:") # For readme_spec.rb module SomeModule; end if defined?(ActiveModel)