Skip to content
Merged
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
4 changes: 1 addition & 3 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
- '3.1'
- '3.0'
- '2.7'
- '2.6'
rails:
- '7.1'
- '7.0'
- '6.1'
- '6.0'
Expand All @@ -60,8 +60,6 @@ jobs:
rails: '5.1'
- ruby: '3.0'
rails: '6.0'
- ruby: '2.6'
rails: '7.0'
env:
RAILS_VERSION: ${{ matrix.rails }}
DATABASE_URL: ${{ matrix.database_url }}
Expand Down
10 changes: 5 additions & 5 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 @@ -311,8 +311,8 @@

create_table :things, force: true do |t|
t.string :name
t.references :user
t.references :box
t.belongs_to :user
t.belongs_to :box

t.timestamps null: false
end
Expand All @@ -324,8 +324,8 @@

create_table :related_things, force: true do |t|
t.string :name
t.references :from, references: :thing
t.references :to, references: :thing
t.belongs_to :from
t.belongs_to :to

t.timestamps null: false
end
Expand Down
5 changes: 4 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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 @@ -65,8 +64,12 @@ class TestApp < Rails::Application
if Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR == 2
config.active_record.sqlite3.represent_boolean_as_integer = true
end

config.hosts << "www.example.com"
end

require 'rails/test_help'

DatabaseCleaner.allow_remote_database_url = true
DatabaseCleaner.strategy = :transaction

Expand Down