@@ -113,6 +113,10 @@ module Transformation
113
113
)
114
114
end
115
115
116
+ let ( :transformation_with_symbolized_metadata ) do
117
+ Pipeline . new ( transformation , SymbolizeMetadataKeys . new , to_domain_event : NULL )
118
+ end
119
+
116
120
specify "#dump" do
117
121
result = transformation . dump ( record )
118
122
expect ( result ) . to eq ( dump_of_record )
@@ -344,10 +348,10 @@ module Transformation
344
348
valid_at : nil ,
345
349
)
346
350
347
- expect ( transformation . dump ( record ) . metadata [ :types ] ) . to eq (
348
- { data : "ActiveSupport::TimeWithZone" , metadata : { } } ,
349
- )
350
- expect ( transformation . load ( transformation . dump ( record ) ) ) . to eq ( record )
351
+ [ transformation , transformation_with_symbolized_metadata ] . each do | t |
352
+ expect ( t . dump ( record ) . metadata [ :types ] ) . to eq ( { data : "ActiveSupport::TimeWithZone" , metadata : { } } )
353
+ expect ( t . load ( t . dump ( record ) ) ) . to eq ( record )
354
+ end
351
355
ensure
352
356
Time . zone = current_tz
353
357
end
@@ -371,8 +375,10 @@ module Transformation
371
375
valid_at : nil ,
372
376
)
373
377
374
- expect ( transformation . dump ( record ) . metadata [ :types ] ) . to eq ( { data : "OpenStruct" , metadata : { } } )
375
- expect ( transformation . load ( transformation . dump ( record ) ) ) . to eq ( record )
378
+ [ transformation , transformation_with_symbolized_metadata ] . each do |t |
379
+ expect ( t . dump ( record ) . metadata [ :types ] ) . to eq ( { data : "OpenStruct" , metadata : { } } )
380
+ expect ( t . load ( t . dump ( record ) ) ) . to eq ( record )
381
+ end
376
382
end
377
383
378
384
specify "handle classes with overloaded name like ActiveSupport::TimeWithZone < 7.1" do
0 commit comments