Sha256: c498c2099e1e71a8e5651b7889b980471e823d4de8dcfb02ca7cec2aca6b8712
Contents?: true
Size: 687 Bytes
Versions: 2
Compression:
Stored size: 687 Bytes
Contents
ENV["RAILS_ENV"] = "test" require 'pathname' require 'yaml' require 'active_record' require 'ar_transaction_changes' require 'minitest/autorun' test_dir = Pathname.new(File.dirname(__FILE__)) config_filename = test_dir.join("database.yml").exist? ? "database.yml" : "database.yml.default" database_yml = YAML.load(test_dir.join(config_filename).read) ActiveRecord::Base.establish_connection database_yml['test'] ActiveRecord::Base.connection.tap do |db| db.drop_table(:users) if db.table_exists?(:users) db.create_table(:users) do |t| t.string :name t.string :occupation t.timestamps null: false end end Dir[test_dir.join("models/*.rb")].each{ |file| require file }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ar_transaction_changes-1.1.2 | test/test_helper.rb |
ar_transaction_changes-1.1.1 | test/test_helper.rb |