Skip to content

Commit

Permalink
Fix test with rubocop 1.49.0+
Browse files Browse the repository at this point in the history
Close #64
  • Loading branch information
sue445 committed Apr 8, 2023
1 parent a9a145f commit fb4fffc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rubocop-itamae.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = '>= 2.5.0'

spec.add_dependency 'rubocop', '>= 1.13.0'
spec.add_dependency 'rubocop', '>= 1.49.0'

spec.add_development_dependency 'bundler', '>= 1.16'
end
8 changes: 4 additions & 4 deletions spec/rubocop/cop/itamae/cd_in_execute_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
it 'registers an offense' do
expect_offense(<<-RUBY)
execute 'cd /tmp && rm -rf /tmp/*'
^^^^^^^^^^^ Insert `cwd '/tmp'` and remove this.
^^^^^^^^^^^ Itamae/CdInExecute: Insert `cwd '/tmp'` and remove this.
RUBY
end

Expand All @@ -34,7 +34,7 @@
it 'registers an offense' do
expect_offense(<<-RUBY)
execute 'cd /tmp && rm -rf /tmp/*' do
^^^^^^^^^^^ Insert `cwd '/tmp'` and remove this.
^^^^^^^^^^^ Itamae/CdInExecute: Insert `cwd '/tmp'` and remove this.
only_if 'ls -l /tmp/*'
end
RUBY
Expand Down Expand Up @@ -67,7 +67,7 @@
expect_offense(<<-RUBY)
execute 'Remove temporary files' do
command 'cd /tmp && rm -rf /tmp/*'
^^^^^^^^^^^ Insert `cwd '/tmp'` and remove this.
^^^^^^^^^^^ Itamae/CdInExecute: Insert `cwd '/tmp'` and remove this.
end
RUBY
end
Expand Down Expand Up @@ -97,7 +97,7 @@
expect_offense(<<-RUBY)
execute 'Remove temporary files' do
command 'cd /tmp && rm -rf /tmp/*'
^^^^^^^^^^^ Insert `cwd '/tmp'` and remove this.
^^^^^^^^^^^ Itamae/CdInExecute: Insert `cwd '/tmp'` and remove this.
only_if 'ls -l /tmp/*'
end
RUBY
Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/itamae/command_equals_to_name_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
expect_offense(<<-RUBY)
execute 'rm -rf /tmp/*' do
command 'rm -rf /tmp/*'
^^^^^^^^^^^^^^^^^^^^^^^ Prefer to omit `command` if `command` equals to name of `execute`
^^^^^^^^^^^^^^^^^^^^^^^ Itamae/CommandEqualsToName: Prefer to omit `command` if `command` equals to name of `execute`
end
RUBY
end
Expand Down
2 changes: 1 addition & 1 deletion spec/rubocop/cop/itamae/needless_default_action_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
expect_offense(<<~RUBY)
package 'git' do
action :install
^^^^^^^^^^^^^^^ Prefer to omit the default action.
^^^^^^^^^^^^^^^ Itamae/NeedlessDefaultAction: Prefer to omit the default action.
end
RUBY
end
Expand Down

0 comments on commit fb4fffc

Please sign in to comment.