Skip to content

Commit 9e311cf

Browse files
yahondaclaude
andcommitted
Reset plsql.activerecord_class after ActiveRecord connection examples
The ActiveRecord connection describe block bound the global plsql schema to ActiveRecord via plsql.activerecord_class= in before(:each) but never reset it. Because oci_connection.ora_date_to_ruby_date consults plsql.default_timezone (a singleton on the global plsql schema), and that accessor returns ActiveRecord.default_timezone when an AR class is bound, every subsequent test that read DATE values back through any OCI connection saw UTC values instead of the local-time defaults. The connection-level "should parse PL/SQL procedure call ... and get bind parameter value" example then asserted equality between a local Time and the UTC round-trip and failed. Reset plsql.activerecord_class to nil in after(:all) so other describe blocks observe a fresh, non-AR-bound plsql singleton. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c66d008 commit 9e311cf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

spec/plsql/schema_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ class TestModel < TestBaseModel
193193
end
194194
end
195195

196+
after(:all) do
197+
plsql.activerecord_class = nil
198+
end
199+
196200
before(:each) do
197201
plsql.activerecord_class = ActiveRecord::Base
198202
end

0 commit comments

Comments
 (0)