diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index aeb9b1ae..741946fc 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -31,7 +31,10 @@ jobs: - '3.0' - 3.1 - 3.2 + - 3.3 + - 3.4 rails: + - 7.1.5.1 - 7.0.4 - 6.1.7 - 6.0.6 @@ -41,6 +44,22 @@ jobs: - postgresql://postgres:password@localhost:5432/test - sqlite3:test_db exclude: + - ruby: 3.4 + rails: 7.0.4 + - ruby: 3.4 + rails: 6.1.7 + - ruby: 3.4 + rails: 6.0.6 + - ruby: 3.4 + rails: 5.2.8.1 + - ruby: 3.4 + rails: 5.1.7 + - ruby: 3.3 + rails: 6.0.6 + - ruby: 3.3 + rails: 5.2.8.1 + - ruby: 3.3 + rails: 5.1.7 - ruby: 3.2 rails: 6.0.6 - ruby: 3.2 diff --git a/test/fixtures/active_record.rb b/test/fixtures/active_record.rb index f8959317..c8c0683c 100644 --- a/test/fixtures/active_record.rb +++ b/test/fixtures/active_record.rb @@ -52,7 +52,7 @@ end create_table :posts, force: true do |t| - t.string :title, length: 255 + t.string :title, limit: 255 t.text :body t.integer :author_id t.integer :parent_post_id @@ -324,11 +324,11 @@ create_table :related_things, force: true do |t| t.string :name - t.references :from, references: :thing - t.references :to, references: :thing t.timestamps null: false end + add_reference :related_things, :from, foreign_key: { to_table: :things } + add_reference :related_things, :to, foreign_key: { to_table: :things } create_table :questions, force: true do |t| t.string :text diff --git a/test/test_helper.rb b/test/test_helper.rb index c1faea37..d1103539 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,3 +1,4 @@ +require "logger" require 'simplecov' require 'database_cleaner' @@ -23,8 +24,6 @@ ENV['DATABASE_URL'] ||= "sqlite3:test_db" require 'active_record/railtie' -require 'rails/test_help' -require 'minitest/mock' require 'jsonapi-resources' require 'pry' @@ -67,6 +66,9 @@ class TestApp < Rails::Application end end +require 'rails/test_help' +require 'minitest/mock' + DatabaseCleaner.allow_remote_database_url = true DatabaseCleaner.strategy = :transaction