jpignata/temping

Add support for ActiveRecord 7.0

dmytro-savochkin opened this issue · 0 comments

Currently the specs are failing with ActiveRecord 7.0.
Example: https://github.com/jpignata/temping/actions/runs/3381973643/jobs/5616403969

Testing adapter version sqlite (ruby x86_64-linux 3.1.2, ActiveRecord 7.0.4, gemfile /home/runner/work/temping/temping/gemfiles/activerecord_7.0.gemfile)
............FF..

Failures:

  1) Temping.create .teardown undefines the models
     Failure/Error: ActiveSupport::Dependencies::Reference.clear!

     NameError:
       uninitialized constant ActiveSupport::Dependencies::Reference

               ActiveSupport::Dependencies::Reference.clear!
                                          ^^^^^^^^^^^
     # ./lib/temping.rb:24:in `teardown'
     # ./spec/temping_spec.rb:153:in `block (4 levels) in <top (required)>'

  2) Temping.create .teardown clears the reflections cache
     Failure/Error: AUTOLOADABLE_CONSTANT

     NameError:
       uninitialized constant AUTOLOADABLE_CONSTANT

               AUTOLOADABLE_CONSTANT
               ^^^^^^^^^^^^^^^^^^^^^
     # ./spec/temping_spec.rb:172:in `block (4 levels) in <top (required)>'

Finished in 0.2[8](https://github.com/jpignata/temping/actions/runs/3381973643/jobs/5616403969#step:5:9)43 seconds (files took 0.72806 seconds to load)
16 examples, 2 failures

Failed examples:

rspec ./spec/temping_spec.rb:142 # Temping.create .teardown undefines the models
rspec ./spec/temping_spec.rb:15[9](https://github.com/jpignata/temping/actions/runs/3381973643/jobs/5616403969#step:5:10) # Temping.create .teardown clears the reflections cache