Skip to content

Commit

Permalink
Fix Layout/SpaceAroundMethodCallOperator cop
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaserver committed Jan 19, 2024
1 parent 4b0c0e0 commit 1cfebe2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
17 changes: 5 additions & 12 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,15 @@ Style/ParenthesesAroundCondition:
Style/PreferredHashMethods:
Enabled: false

Minitest/AssertEmptyLiteral:
Enabled: true

Minitest/AssertNil:
Exclude:
- 'test/graphql/queries/personal_access_token_query_test.rb'
Enabled: true

Minitest/RefuteNil:
Enabled: true

Layout/ArgumentAlignment:
EnforcedStyle: with_fixed_indentation
Enabled: false

Layout/SpaceAroundOperators:
Enabled: true

Layout/SpaceAroundMethodCallOperator:
Enabled: true

Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true

Expand All @@ -105,3 +97,4 @@ Layout/EmptyLineBetweenDefs:

Layout/FirstHashElementIndentation:
Enabled: false

4 changes: 2 additions & 2 deletions test/controllers/api/v2/hosts_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ def initialize_proxy_ops

test "boot call to interface" do
ProxyAPI::BMC.any_instance.stubs(:boot).with(:function => 'bootdevice', :device => 'bios').
returns({ "action" => "bios", "result" => true } .to_json)
returns({ "action" => "bios", "result" => true }.to_json)
put :boot, params: { :id => @bmchost.to_param, :device => 'bios' }
assert_response :success
assert @response.body =~ /true/
Expand Down Expand Up @@ -861,7 +861,7 @@ def initialize_proxy_ops
test 'responds correctly for non-admin user if BMC is available' do
ProxyAPI::BMC.any_instance.stubs(:boot).
with(:function => 'bootdevice', :device => 'bios').
returns({ "action" => "bios", "result" => true } .to_json)
returns({ "action" => "bios", "result" => true }.to_json)
put :boot, params: { :id => @bmchost.to_param, :device => 'bios' },
session: set_session_user.merge(:user => @one.id)
assert_response :success
Expand Down
2 changes: 1 addition & 1 deletion test/models/compute_resources/ovirt_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'test_helper'
require 'models/compute_resources/compute_resource_test_helpers'

class Foreman::Model:: OvirtTest < ActiveSupport::TestCase
class Foreman::Model::OvirtTest < ActiveSupport::TestCase
include ComputeResourceTestHelpers

should validate_presence_of(:url)
Expand Down

0 comments on commit 1cfebe2

Please sign in to comment.