Skip to content

Commit

Permalink
Add support for Rails 7.1 and Ruby 3.3 and 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
UweKubosch committed Jun 9, 2024
1 parent bef716c commit b2d6a1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
ruby-version: '3.3'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Rubocop
run: bundle exec rubocop --auto-correct-all
run: bundle exec rubocop --autocorrect-all
Test:
runs-on: ubuntu-20.04
services:
Expand Down
10 changes: 5 additions & 5 deletions test/middleware_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def setup
def test_get_without_detour
env = env_for('/')

status, headers, response = @stack.call env
status, headers, body = @stack.call env

assert_equal 200, status
assert_equal ['app response'], [*response]
assert_equal ['app response'], [*body]
assert_equal [], headers['rack.session'].to_hash.keys
assert_nil headers['rack.session'].to_hash['detours']
end
Expand All @@ -34,7 +34,7 @@ def test_detour
status, headers, body = @stack.call(env)

assert_equal 200, status
assert_equal ['app response'], body
assert_equal ['app response'], [*body]
assert_equal(%w[session_id detours], headers['rack.session'].to_hash.keys)
assert_equal([{ 'controller' => 'test' }], headers['rack.session'].to_hash['detours'])
end
Expand All @@ -50,10 +50,10 @@ def test_detour_cleanup
last_env = env_for('/?detour[controller]=test_last',
'rack.session' => env['rack.session'],
'rack.session.options' => env['rack.session.options'])
status, env, response = @stack.call last_env
status, env, body = @stack.call last_env

assert_equal 200, status
assert_equal ['app response'], [*response]
assert_equal ['app response'], [*body]
assert_equal(%w[session_id detours], env['rack.session'].to_hash.keys)

assert_equal(((57..99).to_a + [:last]).map { |i| { 'controller' => "test_#{i}" } },
Expand Down

0 comments on commit b2d6a1f

Please sign in to comment.