spec/spec_helper.rb in amoeba-2.1.0 vs spec/spec_helper.rb in amoeba-3.0.0

- old
+ new

@@ -1,10 +1,29 @@ +require 'simplecov' require 'coveralls' -Coveralls.wear! +SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ + SimpleCov::Formatter::HTMLFormatter, + Coveralls::SimpleCov::Formatter +] +SimpleCov.start do + add_filter 'spec' + minimum_coverage(76) +end +require 'active_record' require 'amoeba' -ActiveRecord::Base.establish_connection(:adapter => "sqlite3", - :database => File.dirname(__FILE__) + "/test.sqlite3") +adapter = if defined?(JRuby) + require 'activerecord-jdbcsqlite3-adapter' + 'jdbcsqlite3' + else + require 'sqlite3' + 'sqlite3' + end +ActiveRecord::Base.establish_connection(adapter: adapter, database: ':memory:') + +::RSpec.configure do |config| + config.order = :default +end + load File.dirname(__FILE__) + '/support/schema.rb' load File.dirname(__FILE__) + '/support/models.rb' -load File.dirname(__FILE__) + '/support/data.rb'