File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,18 @@ jobs:
2222 BUNDLE_GEMFILE : ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
2323 steps :
2424 - uses : actions/checkout@v3
25+
2526 - name : Set up Ruby
2627 uses : ruby/setup-ruby@v1
2728 with :
2829 ruby-version : ${{ matrix.ruby-version }}
2930 rubygems : 3.4.10
3031 bundler-cache : true # runs 'bundle install' and caches installed gems automatically
32+
33+ - name : Run linter
34+ if : matrix.ruby-version == '3.3' && matrix.gemfile == 'rails_7.2'
35+ run : bundle exec rubocop
36+
3137 - name : Run tests
3238 run : bundle exec rspec
3339
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ module SpecHelpers
55 # This sets up the OmniAuth mock for the given user. It assumes the User
66 # model has an `:user_id` method which returns the users ID, but this can
77 # be changed by setting the `id_param` option.
8- def stub_auth_for ( user :, id_param : :user_id ) # rubocop:disable Metrics/AbcSize
8+ def stub_auth_for ( user :, id_param : :user_id )
99 expires_at = user . respond_to? ( :expires_at ) && user . expires_at
1010 expires_in = expires_at . present? ? expires_at . to_i - Time . zone . now . to_i : 3600
1111 token = user . respond_to? ( :access_token ) ? user . access_token : SecureRandom . hex ( 16 )
Original file line number Diff line number Diff line change 265265 expect ( response ) . to redirect_to ( '/' )
266266 end
267267
268- context 'when the proc resolves to something other than nil' do # rubocop:disable RSpec/NestedGroups
268+ context 'when the proc resolves to something other than nil' do
269269 # We use `current_user` and `request.env` here as they're available
270270 # in the context of the controller. We use `let!` to make sure the
271271 # proc is defined straightaway, rather than later, when `request` and
283283 end
284284 end
285285
286- context 'when the proc raises an exception' do # rubocop:disable RSpec/NestedGroups
286+ context 'when the proc raises an exception' do
287287 # We use `current_user` and `request.env` here as they're available
288288 # in the context of the controller. We use `let!` to make sure the
289289 # proc is defined straightaway, rather than later, when `request` and
You can’t perform that action at this time.
0 commit comments