Skip to content

Instantly share code, notes, and snippets.

@arthurnn
Created June 9, 2015 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arthurnn/91275b88625ba34b81a0 to your computer and use it in GitHub Desktop.
Save arthurnn/91275b88625ba34b81a0 to your computer and use it in GitHub Desktop.
require 'active_record'
require 'minitest/autorun'
require 'logger'
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
p ActiveRecord.version
ActiveRecord::Base.logger = Logger.new(STDOUT)
class Post < ActiveRecord::Base
connection.create_table table_name, force: true do |t|
t.timestamps
end
end
class BugTest < ActiveSupport::TestCase
include ActiveModel::Lint::Tests
def setup
@model = Post.create!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment