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:
22
22
BUNDLE_GEMFILE : ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
23
23
steps :
24
24
- uses : actions/checkout@v3
25
+
25
26
- name : Set up Ruby
26
27
uses : ruby/setup-ruby@v1
27
28
with :
28
29
ruby-version : ${{ matrix.ruby-version }}
29
30
rubygems : 3.4.10
30
31
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
+
31
37
- name : Run tests
32
38
run : bundle exec rspec
33
39
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ module SpecHelpers
5
5
# This sets up the OmniAuth mock for the given user. It assumes the User
6
6
# model has an `:user_id` method which returns the users ID, but this can
7
7
# 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 )
9
9
expires_at = user . respond_to? ( :expires_at ) && user . expires_at
10
10
expires_in = expires_at . present? ? expires_at . to_i - Time . zone . now . to_i : 3600
11
11
token = user . respond_to? ( :access_token ) ? user . access_token : SecureRandom . hex ( 16 )
Original file line number Diff line number Diff line change 265
265
expect ( response ) . to redirect_to ( '/' )
266
266
end
267
267
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
269
269
# We use `current_user` and `request.env` here as they're available
270
270
# in the context of the controller. We use `let!` to make sure the
271
271
# proc is defined straightaway, rather than later, when `request` and
283
283
end
284
284
end
285
285
286
- context 'when the proc raises an exception' do # rubocop:disable RSpec/NestedGroups
286
+ context 'when the proc raises an exception' do
287
287
# We use `current_user` and `request.env` here as they're available
288
288
# in the context of the controller. We use `let!` to make sure the
289
289
# proc is defined straightaway, rather than later, when `request` and
You can’t perform that action at this time.
0 commit comments