Skip to content

Commit

Permalink
rubocop: fix RSpec/ImplicitExpect
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Mar 17, 2023
1 parent 93062fd commit b831092
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
7 changes: 0 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ RSpec/DescribeClass:
Exclude:
- 'spec/acceptance/example_spec.rb'

# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: .
# SupportedStyles: is_expected, should
RSpec/ImplicitExpect:
EnforcedStyle: should

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline.
Expand Down
10 changes: 5 additions & 5 deletions spec/acceptance/example_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
'ssh'
end
describe service(sshd), :node => node do
it { should be_running }
it { is_expected.to be_running }
end

usr = case node['platform']
Expand All @@ -48,7 +48,7 @@
'root'
end
describe user(usr), :node => node do
it { should exist }
it { is_expected.to exist }
end
end
end
Expand All @@ -61,16 +61,16 @@
'root'
end
describe user(usr) do
it { should exist }
it { is_expected.to exist }
end
end

context "serverspec: can match multiline file to multiline contents" do
contents = "four = five\n[one]\ntwo = three"
create_remote_file(default, "file_with_contents.txt", contents)
describe file("file_with_contents.txt") do
it { should be_file }
it { should contain(contents) }
it { is_expected.to be_file }
it { is_expected.to contain(contents) }
end
end
end

0 comments on commit b831092

Please sign in to comment.