Skip to content

Commit

Permalink
chore: update tests for Rails 8
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Nov 21, 2024
1 parent d3587fe commit 6a5c7b9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ jobs:
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
CI: true
COVERAGE: ${{ matrix.coverage }}
COVERALLS_REPO_TOKEN: ${{ secrets.github_token }}
strategy:
fail-fast: false
matrix:
ruby: ["2.7"]
ruby: ["3.3"]
bundler: ["2"]
gemfile: [
"gemfiles/rails6.gemfile"
"gemfiles/rails8.gemfile"
]
coverage: ["false"]
include:
Expand All @@ -38,7 +39,7 @@ jobs:
- ruby: "3.3"
gemfile: "gemfiles/rails71.gemfile"
coverage: "true"
- ruby: "3.1"
- ruby: "3.3"
gemfile: "gemfiles/railsmaster.gemfile"
coverage: "false"
steps:
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gem "debug", platform: :mri unless ENV["CI"] == "true"
gem "method_source"
gem "prism"

gem 'sqlite3', "~> 1.4.0", platform: :mri
gem 'sqlite3', "~> 2.0", platform: :mri
gem 'activerecord-jdbcsqlite3-adapter', '~> 50.0', platform: :jruby
gem 'jdbc-sqlite3', platform: :jruby

Expand All @@ -20,7 +20,7 @@ local_gemfile = File.join(__dir__, "Gemfile.local")
if File.exist?(local_gemfile)
eval(File.read(local_gemfile)) # rubocop:disable Security/Eval
else
gem "rails", "~> 6.0"
gem "rails", "~> 8.0"
end

if ENV["COVERAGE"] == "true"
Expand Down
13 changes: 13 additions & 0 deletions gemfiles/rails8.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
source "https://rubygems.org"

gem "sqlite3", "~> 2.1"
gem "rails", "~> 8.0"
gem "method_source"
gem "prism"

if ENV["COVERAGE"] == "true"
gem "simplecov"
gem "simplecov-lcov"
end

gemspec path: ".."
2 changes: 1 addition & 1 deletion gemfiles/railsmaster.gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source "https://rubygems.org"

gem "sqlite3", "~> 1.4"
gem "sqlite3", "~> 2.1"
gem "rails", github: "rails/rails"

gemspec path: ".."
4 changes: 1 addition & 3 deletions test/action_policy/rails/controllers_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ def _routes
SharedTestRoutes = ActionDispatch::Routing::RouteSet.new

SharedTestRoutes.draw do
ActiveSupport::Deprecation.silence do
get ":controller(/:action)"
end
get ":controller(/:action)"
end

ActionController::TestCase.include(
Expand Down
1 change: 1 addition & 0 deletions test/action_policy/rails/dummy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp/

0 comments on commit 6a5c7b9

Please sign in to comment.