From 4ea1e0fceb0c0c5fee014a99f81f8f13a16f6dde Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 19 Feb 2023 23:00:59 -0500 Subject: [PATCH] Enable Rubocop RSpec/ExpectActual (#23720) --- .rubocop_todo.yml | 6 ------ spec/controllers/well_known/nodeinfo_controller_spec.rb | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4c3b3ecb6d..eb0910fe6c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -821,12 +821,6 @@ RSpec/EmptyExampleGroup: RSpec/ExampleLength: Max: 22 -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -RSpec/ExpectActual: - Exclude: - - 'spec/controllers/well_known/nodeinfo_controller_spec.rb' - # Offense count: 21 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. diff --git a/spec/controllers/well_known/nodeinfo_controller_spec.rb b/spec/controllers/well_known/nodeinfo_controller_spec.rb index e9436cd262..0cadc54357 100644 --- a/spec/controllers/well_known/nodeinfo_controller_spec.rb +++ b/spec/controllers/well_known/nodeinfo_controller_spec.rb @@ -26,8 +26,9 @@ describe WellKnown::NodeInfoController, type: :controller do expect(response.media_type).to eq 'application/json' json = body_as_json + foo = { 'foo' => 0 } - expect({ 'foo' => 0 }).to_not match_json_schema('nodeinfo_2.0') + expect(foo).to_not match_json_schema('nodeinfo_2.0') expect(json).to match_json_schema('nodeinfo_2.0') expect(json[:version]).to eq '2.0' expect(json[:usage]).to be_a Hash