Sha256: a5458b26aca1d0959c01a7472ad4b0b09e6a6e9ab9926e18ea9de48fe1ca6f16
Contents?: true
Size: 877 Bytes
Versions: 1
Compression:
Stored size: 877 Bytes
Contents
require "logger" logger = Logger.new(File.expand_path "../../log/test.log", __FILE__) logger.level = Logger::DEBUG require "codeclimate-test-reporter" CodeClimate::TestReporter.configure do |config| config.logger = logger end CodeClimate::TestReporter.start require "rspec/core" require "database_cleaner" require "datetime-scopes" ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:" ActiveRecord::Base.logger = logger DatabaseCleaner.strategy = :truncation RSpec.configure do |c| c.before :suite do DatabaseCleaner.clean end c.after :example do DatabaseCleaner.clean end end # Create table and declare AR model ActiveRecord::Migration.verbose = false ActiveRecord::Migration.create_table :foo_bars do |t| t.datetime :foo t.date :bar end class FooBar < ActiveRecord::Base datetime_scopes :foo date_scopes :bar end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
datetime-scopes-1.0.0.alpha2 | spec/spec_helper.rb |