Sha256: 32374e55071fd02ffd1af9e5dcf3b267fca10c60944e2a4f966311505add2f80
Contents?: true
Size: 734 Bytes
Versions: 4
Compression:
Stored size: 734 Bytes
Contents
# frozen_string_literal: true require "cases/helper" if current_adapter?(:Mysql2Adapter) or current_adapter?(:IBM_DBAdapter) class TestAdapterWithInvalidConnection < ActiveRecord::TestCase self.use_transactional_tests = false class Bird < ActiveRecord::Base end def setup # Can't just use current adapter; sqlite3 will create a database # file on the fly. Bird.establish_connection adapter: "ibm_db", database: "i_do_not_exist" end teardown do Bird.remove_connection end test "inspect on Model class does not raise" do assert_equal "#{Bird.name} (call '#{Bird.name}.connection' to establish a connection)", Bird.inspect end end end
Version data entries
4 entries across 4 versions & 1 rubygems