Skip to content

Commit 540854b

Browse files
mostlyobviousfidel
andcommitted
No ActiveRecord cache interference across specs
https://github.com/RailsEventStore/rails_event_store/actions/runs/15561765461/job/43815644012 Reproduction: * cd ruby_event_store-active_record * git checkout che4f31d95da * env DATA_TYPE=json DATABASE_URL=... exec rspec --seed 8241 --fail-fast Co-authored-by: Szymon Fiedler <[email protected]>
1 parent 4f31d95 commit 540854b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ruby_event_store-active_record/spec/skip_ar_serialization_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ module ActiveRecord
2828

2929
record = repository.read(specification.result).first
3030
expect(record.data).to eq({ "foo" => "bar" })
31+
3132
expect(
3233
::ActiveRecord::Base
3334
.connection

ruby_event_store-active_record/spec/spec_helper.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def serializer
2424
def run_lifecycle
2525
establish_database_connection
2626
load_database_schema
27+
reset_column_information
2728
yield
2829
ensure
2930
drop_database
@@ -64,6 +65,10 @@ def has_connection_pooling?
6465
def connection_pool_size
6566
::ActiveRecord::Base.connection.pool.size
6667
end
68+
69+
def reset_column_information
70+
::ActiveRecord::Base.reset_column_information
71+
end
6772
end
6873
end
6974

0 commit comments

Comments
 (0)