Sha256: e43312376bc0b094c585cfe812826d9117f285c4e911aa0c7ac32bb377e5be15
Contents?: true
Size: 408 Bytes
Versions: 7
Compression:
Stored size: 408 Bytes
Contents
require 'database_cleaner' class User < ActiveRecord::Base; end class Category < ActiveRecord::Base belongs_to :created_by, class_name: 'User' end class Post < ActiveRecord::Base belongs_to :category belongs_to :user scope(:published, -> { where(published: true) }) end RSpec.configure do |config| config.after do DatabaseCleaner.strategy = :truncation DatabaseCleaner.clean end end
Version data entries
7 entries across 7 versions & 1 rubygems