Skip to content

Commit 844c025

Browse files
committed
(maint) Update security spec to rspec3
Previously, the test failed using rspec3 with the error: Failure/Error: system_aces.any? do |ace| expected true to respond to `true?` or perhaps you meant `be true` or `be_truthy` Updated test to use rspec3 syntax.
1 parent 8838ace commit 844c025

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/integration/util/windows/security_spec.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ def grant_everyone_full_access(path)
241241

242242
if Puppet::FileSystem.directory?(path)
243243
system_aces.each do |ace|
244-
ace.object_inherit?.should be_true
245-
ace.container_inherit?.should be_true
244+
expect(ace).to be_object_inherit
245+
expect(ace).to be_container_inherit
246246
end
247247

248248
# it's critically important that this file be default created
@@ -252,9 +252,9 @@ def grant_everyone_full_access(path)
252252

253253
system_aces = winsec.get_aces_for_path_by_sid(nested_file, sids[:system])
254254
# even when SYSTEM is the owner (in CI), there should be an inherited SYSTEM
255-
system_aces.any? do |ace|
255+
expect(system_aces.any? do |ace|
256256
ace.mask == klass::FILE_ALL_ACCESS && ace.inherited?
257-
end.should be_true
257+
end).to be_truthy
258258
end
259259
end
260260

0 commit comments

Comments
 (0)