Invoca / aggregate

A no-sql style key value store with migrations and data validations
MIT License
1 stars 2 forks source link

Rails 6.1+ Tests Won't Run: Fix References to ActiveRecord::DefineCallback #116

Open omeedrj opened 3 years ago

omeedrj commented 3 years ago

Currently tests won't run for Rails 6 because they of this error.

master => ~/invoca/aggregate/ bundle exec appraisal rails-6 ruby test/unit/aggregate_store_test.rb
>> BUNDLE_GEMFILE=/Users/orabani/invoca/aggregate/gemfiles/rails_6.gemfile bundle exec ruby test/unit/aggregate_store_test.rb
Traceback (most recent call last):
    5: from test/unit/aggregate_store_test.rb:3:in `<main>'
    4: from test/unit/aggregate_store_test.rb:3:in `require_relative'
    3: from /Users/orabani/invoca/aggregate/test/test_helper.rb:6:in `<top (required)>'
    2: from /Users/orabani/invoca/aggregate/test/test_helper.rb:6:in `require'
    1: from /Users/orabani/invoca/aggregate/lib/aggregate.rb:6:in `<top (required)>'
/Users/orabani/invoca/aggregate/lib/aggregate.rb:6:in `require': cannot load such file -- active_record/define_callbacks (LoadError)

This is happening because the required module was removed in Rails 6.

https://github.com/rails/rails/blob/5-2-stable/activerecord/lib/active_record/define_callbacks.rb#L4-L7

Update: For now we've blocked support for Rails >= 6.1, but we'll need to address this once we get to the point where we'll want/need to support those later versions.

omeedrj commented 3 years ago

cc: @lmaragon

ColinDKelley commented 3 years ago

"Fixed" for now in v2.4.0 by stopping Rails 6 support at < 6.1.

omeedrj commented 3 years ago

Thanks @ColinDKelley, I updated the issue body and will leave it open as a reminder for us whenever we get to 6.1+