Sha256: 2345dd29a851c6388e3bb15075adb34636086e321b7c4914a9fc299d6fff57cd
Contents?: true
Size: 769 Bytes
Versions: 7
Compression:
Stored size: 769 Bytes
Contents
require 'rubygems' require 'bundler/setup' require 'minitest/autorun' require 'minitest/pride' # Configure Rails Environment ENV["RAILS_ENV"] = "test" require File.expand_path("../dummy/config/environment.rb", __FILE__) require "rails/test_help" Rails.backtrace_cleaner.remove_silencers! # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } def setup_database ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS users") ActiveRecord::Base.connection.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)") ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS comments") ActiveRecord::Base.connection.execute("CREATE TABLE comments (id INTEGER PRIMARY KEY, body TEXT, user_id INTEGER)") end
Version data entries
7 entries across 7 versions & 1 rubygems