From a5bfb805e1622ea4fd1d897dd9ac61f0825d3176 Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Tue, 6 Aug 2019 00:46:54 -0400 Subject: [PATCH] Update rubocop and friends --- .rubocop.yml | 5 ++++ paper_trail.gemspec | 6 ++-- .../associations/has_many_through_spec.rb | 30 +++++++++---------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index a17f8291..a8ad68e2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -104,6 +104,11 @@ Naming/UncommunicativeMethodParamName: RSpec/DescribeClass: Enabled: false +# This cop has a bug in 1.35.0 +# https://github.com/rubocop-hq/rubocop-rspec/issues/799 +RSpec/DescribedClass: + Enabled: false + # Yes, ideally examples would be short. Is it possible to pick a limit and say, # "no example will ever be longer than this"? Hard to say. Sometimes they're # quite long. diff --git a/paper_trail.gemspec b/paper_trail.gemspec index a7f95877..e98f35eb 100644 --- a/paper_trail.gemspec +++ b/paper_trail.gemspec @@ -43,8 +43,8 @@ has been destroyed. s.add_development_dependency "pg", "~> 1.0" s.add_development_dependency "rake", "~> 12.3" s.add_development_dependency "rspec-rails", "~> 3.8" - s.add_development_dependency "rubocop", "~> 0.71.0" - s.add_development_dependency "rubocop-performance", "~> 1.3.0" - s.add_development_dependency "rubocop-rspec", "~> 1.33.0" + s.add_development_dependency "rubocop", "~> 0.74.0" + s.add_development_dependency "rubocop-performance", "~> 1.4" + s.add_development_dependency "rubocop-rspec", "~> 1.35" s.add_development_dependency "sqlite3", "~> 1.3.13" end diff --git a/spec/paper_trail/associations/has_many_through_spec.rb b/spec/paper_trail/associations/has_many_through_spec.rb index 057bccc0..d0b9b300 100644 --- a/spec/paper_trail/associations/has_many_through_spec.rb +++ b/spec/paper_trail/associations/has_many_through_spec.rb @@ -2,22 +2,22 @@ require "spec_helper" -RSpec.describe(::PaperTrail, versioning: true) do - CHAPTER_NAMES = [ - "Down the Rabbit-Hole", - "The Pool of Tears", - "A Caucus-Race and a Long Tale", - "The Rabbit Sends in a Little Bill", - "Advice from a Caterpillar", - "Pig and Pepper", - "A Mad Tea-Party", - "The Queen's Croquet-Ground", - "The Mock Turtle's Story", - "The Lobster Quadrille", - "Who Stole the Tarts?", - "Alice's Evidence" - ].freeze +CHAPTER_NAMES = [ + "Down the Rabbit-Hole", + "The Pool of Tears", + "A Caucus-Race and a Long Tale", + "The Rabbit Sends in a Little Bill", + "Advice from a Caterpillar", + "Pig and Pepper", + "A Mad Tea-Party", + "The Queen's Croquet-Ground", + "The Mock Turtle's Story", + "The Lobster Quadrille", + "Who Stole the Tarts?", + "Alice's Evidence" +].freeze +RSpec.describe(::PaperTrail, versioning: true) do context "Books, Authors, and Authorships" do before { @book = Book.create(title: "book_0") }