Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix test
Oops. We need to estalish/remove the connection in the setup/teardown,
else it messes with the fixtures.
  • Loading branch information
jonleighton authored and carlosantoniodasilva committed Jun 28, 2013
1 parent fb86632 commit bb515e2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion activerecord/test/cases/invalid_connection_test.rb
Expand Up @@ -4,9 +4,16 @@ class TestAdapterWithInvalidConnection < ActiveRecord::TestCase
self.use_transactional_fixtures = false

class Bird < ActiveRecord::Base
end

def setup
# Can't just use current adapter; sqlite3 will create a database
# file on the fly.
establish_connection adapter: 'mysql', database: 'i_do_not_exist'
Bird.establish_connection adapter: 'mysql', database: 'i_do_not_exist'
end

def teardown
Bird.remove_connection
end

test "inspect on Model class does not raise" do
Expand Down

0 comments on commit bb515e2

Please sign in to comment.