Skip to content

Commit

Permalink
Fix RuboCop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sds committed Feb 25, 2024
1 parent f46660a commit fe3183a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions lib/overcommit/hook/shared/r_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ module Overcommit::Hook::Shared
# @see http://rspec.info/
module RSpec
def run
result = if @config["include"]
execute(command, args: applicable_files)
else
execute(command)
end
result = if @config['include']
execute(command, args: applicable_files)
else
execute(command)
end

return :pass if result.success?

Expand Down
4 changes: 2 additions & 2 deletions spec/overcommit/hook/pre_commit/r_spec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

subject.run
}

end

context 'with included files set' do
Expand All @@ -48,7 +47,8 @@
it { should pass }

it {
expect(subject).to receive(:execute).with(['rspec'], args: 'spec/test_spec.rb').and_return(result)
expect(subject).to receive(:execute).with(['rspec'],
args: 'spec/test_spec.rb').and_return(result)

subject.run
}
Expand Down
4 changes: 2 additions & 2 deletions spec/overcommit/hook/pre_push/r_spec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

subject.run
}

end

context 'with included files set' do
Expand All @@ -48,7 +47,8 @@
it { should pass }

it {
expect(subject).to receive(:execute).with(['rspec'], args: 'spec/test_spec.rb').and_return(result)
expect(subject).to receive(:execute).with(['rspec'],
args: 'spec/test_spec.rb').and_return(result)

subject.run
}
Expand Down

0 comments on commit fe3183a

Please sign in to comment.