Sha256: 9e912136bde9ba8b88e3374df5be820d791ef21d65bf1e5ab09a65d69c9cbabb
Contents?: true
Size: 1.3 KB
Versions: 1
Compression:
Stored size: 1.3 KB
Contents
# This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # Require this file using `require "spec_helper"` to ensure that it is only # loaded once. # # see http://blog.markstarkman.com/blog/2013/01/23/using-sqlite-to-test-active-record-models/ require 'active_record' ActiveRecord::Base.establish_connection adapter: 'postgresql', database: 'similar_models' # ActiveRecord::Base.establish_connection adapter: 'mysql2', database: 'similar_models' # ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:' load 'support/schema.rb' require 'similar_models' require 'support/models' require 'database_cleaner' require 'byebug' DatabaseCleaner.strategy = :transaction # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| config.run_all_when_everything_filtered = true config.filter_run :focus # Run specs in random order to surface order dependencies. If you find an # order dependency and want to debug it, you can fix the order by providing # the seed, which is printed after each run. # --seed 1234 config.order = 'random' config.before :each do DatabaseCleaner.start end config.after :each do DatabaseCleaner.clean end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
similar_models-0.1.0 | spec/spec_helper.rb |