Skip to content
Browse files

Reconnect connection if it goes inactive after `set_logger` called

  • Loading branch information...
1 parent 45d2bec commit bb372bf14eb1b3a614365196d4f44e2722f0d00f @yahonda yahonda committed Mar 2, 2013
View
1 spec/active_record/connection_adapters/oracle_enhanced_schema_statements_spec.rb
@@ -190,6 +190,7 @@ class ::TestEmployee < ActiveRecord::Base
it "should not generate NoMethodError for :returning_id:Symbol" do
set_logger
+ @conn.reconnect! unless @conn.active?
insert_id = @conn.insert("INSERT INTO test_employees (first_name) VALUES ('Yasuo')", nil, "id")
@logger.output(:error).should_not match(/^Could not log "sql.active_record" event. NoMethodError: undefined method `name' for :returning_id:Symbol/)
clear_logger

0 comments on commit bb372bf

Please sign in to comment.
Something went wrong with that request. Please try again.