Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "logger"
require 'simplecov'
require 'database_cleaner'

Expand All @@ -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'

Expand Down Expand Up @@ -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

Expand Down
Loading