spec/spec_helper.rb in lev-2.0.4 vs spec/spec_helper.rb in lev-2.0.5
- old
+ new
@@ -17,6 +17,22 @@
end
require 'lev'
-Dir[(File.expand_path('../support', __FILE__)) + ("/**/*.rb")].each { |f| require f }
\ No newline at end of file
+Dir[(File.expand_path('../support', __FILE__)) + ("/**/*.rb")].each { |f| require f }
+
+ActiveRecord::Base.establish_connection(
+ adapter: :sqlite3,
+ database: ':memory:',
+)
+ActiveRecord::ConnectionAdapters::SQLiteAdapter = ActiveRecord::ConnectionAdapters::SQLite3Adapter
+TransactionIsolation.apply_activerecord_patch
+
+unless Sprocket.table_exists?
+ ActiveRecord::Schema.define do
+ create_table 'sprockets', force: true do |t|
+ t.integer 'integer_gt_2'
+ t.string 'text_only_letters'
+ end
+ end
+end