Skip to content

Commit

Permalink
DEV: Update ruby linting (#174)
Browse files Browse the repository at this point in the history
* DEV: Update ruby linting

* Use named subject in specs

---------

Co-authored-by: Loïc Guitaut <loic@discourse.org>
  • Loading branch information
CvX and Flink committed Dec 1, 2023
1 parent db2581f commit 5831304
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 18 deletions.
47 changes: 30 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,51 @@ GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
json (2.6.2)
parallel (1.22.1)
parser (3.1.2.1)
json (2.6.3)
language_server-protocol (3.17.0.3)
parallel (1.23.0)
parser (3.2.2.4)
ast (~> 2.4.1)
prettier_print (1.2.0)
racc
prettier_print (1.2.1)
racc (1.7.3)
rainbow (3.1.1)
regexp_parser (2.6.0)
rexml (3.2.5)
rubocop (1.36.0)
regexp_parser (2.8.2)
rexml (3.2.6)
rubocop (1.57.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.1.2.1)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.21.0)
parser (>= 3.1.1.0)
rubocop-discourse (3.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.19.0)
rubocop (~> 1.41)
rubocop-discourse (3.4.1)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.13.2)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
ruby-progressbar (1.11.0)
syntax_tree (5.1.0)
rubocop-rspec (2.25.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
syntax_tree (6.2.0)
prettier_print (>= 1.2.0)
unicode-display_width (2.3.0)
unicode-display_width (2.5.0)

PLATFORMS
arm64-darwin-20
arm64-darwin-22
ruby
x86_64-linux

DEPENDENCIES
rubocop-discourse
Expand Down
4 changes: 3 additions & 1 deletion spec/ensure_consistency_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
require "rails_helper"

describe Jobs::VotingEnsureConsistency do
subject(:job) { described_class.new }

it "ensures consistency" do
user = Fabricate(:user)
user2 = Fabricate(:user)
Expand All @@ -22,7 +24,7 @@
DiscourseTopicVoting::Vote.create!(user: user, topic: two_vote_topic, archive: true)
DiscourseTopicVoting::Vote.create!(user: user2, topic: two_vote_topic)

subject.execute_onceoff(nil)
job.execute_onceoff(nil)

no_vote_topic.reload

Expand Down

0 comments on commit 5831304

Please sign in to comment.