Sha256: 324138fc2eaa4021c3871e2f0edce170aaf14a1ce712741a0a22ebaa448aa37a
Contents?: true
Size: 584 Bytes
Versions: 1
Compression:
Stored size: 584 Bytes
Contents
require 'active_record' require 'activeform-rails' require 'database_cleaner' ActiveRecord::Base.establish_connection( :adapter => "sqlite3", :database => "#{Dir.pwd}/database.sqlite3" ) class User < ActiveRecord::Base has_many :categories end class Category < ActiveRecord::Base belongs_to :user end RSpec.configure do |config| config.before(:suite) do DatabaseCleaner.strategy = :transaction DatabaseCleaner.clean_with(:truncation) end 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 |
---|---|
activeform-rails-0.0.2 | spec/spec_helper.rb |