From 00a8b03ac93633addf37cf3cb94a41b6af8a2551 Mon Sep 17 00:00:00 2001 From: Aaron Ciaghi <133417+aaronsama@users.noreply.github.com> Date: Thu, 5 Oct 2023 14:49:46 +0200 Subject: [PATCH] Fix Rubocop offenses --- .rubocop.yml | 2 +- .../rails_cursor_pagination/paginator_spec.rb | 20 +++++++++++-------- spec/spec_helper.rb | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 639b37c..293c044 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,7 +13,7 @@ Metrics/BlockLength: - spec/**/* Metrics/ClassLength: - Max: 198 + Max: 210 Metrics/CyclomaticComplexity: Max: 15 diff --git a/spec/rails_cursor_pagination/paginator_spec.rb b/spec/rails_cursor_pagination/paginator_spec.rb index 78918a9..dfe14ff 100644 --- a/spec/rails_cursor_pagination/paginator_spec.rb +++ b/spec/rails_cursor_pagination/paginator_spec.rb @@ -269,10 +269,12 @@ :start_cursor, :end_cursor - is_expected.to include has_previous_page: expected_has_previous_page, - has_next_page: expected_has_next_page, - start_cursor: expected_start_cursor, - end_cursor: expected_end_cursor + is_expected.to( + include has_previous_page: expected_has_previous_page, + has_next_page: expected_has_next_page, + start_cursor: expected_start_cursor, + end_cursor: expected_end_cursor + ) end end @@ -924,10 +926,12 @@ :start_cursor, :end_cursor - is_expected.to include has_previous_page: expected_has_previous_page, - has_next_page: expected_has_next_page, - start_cursor: expected_start_cursor, - end_cursor: expected_end_cursor + is_expected.to( + include has_previous_page: expected_has_previous_page, + has_next_page: expected_has_next_page, + start_cursor: expected_start_cursor, + end_cursor: expected_end_cursor + ) end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c378a27..85c64b4 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -29,7 +29,7 @@ class Post < ActiveRecord::Base; end host: ENV.fetch('DB_HOST', nil), username: ENV.fetch('DB_USER', nil) ) - + # Ensure we have an empty `posts` table with the right format ActiveRecord::Migration.drop_table :posts, if_exists: true