Sha256: 807ebcaa21b9fef0400c467209c478bfdd361a5f52bafb78cf7335ea618e2ec0
Contents?: true
Size: 970 Bytes
Versions: 2
Compression:
Stored size: 970 Bytes
Contents
# frozen_string_literal: true $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib') require 'sqlite3' require 'simplecov' require 'acts_as_contactable' require 'factory_bot' Dir['./spec/shared_example/**/*.rb'].sort.each { |f| require f } Dir['./spec/support/**/*.rb'].sort.each { |f| require f } SimpleCov.start ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') ActiveRecord::Schema.define(version: 1) do create_table :addresses do |t| t.references :addressable, polymorphic: true t.string :name t.string :street t.string :street2 t.string :city t.string :state t.string :zip t.boolean :primary t.timestamps end add_index :addresses, [:addressable_id, :addressable_type] create_table :addressables do |t| t.string :name end end class Contactable < ActiveRecord::Base acts_as_contactable validates_presence_of :name end class NotContactable < ActiveRecord::Base end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
acts-as-contactable-0.2.2 | spec/spec_helper.rb |
acts-as-contactable-0.2.1 | spec/spec_helper.rb |