summaryrefslogtreecommitdiff
path: root/spec/stress
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-10-29 15:14:22 -0700
committerClaire McQuin <claire@getchef.com>2014-10-29 15:59:04 -0700
commit5fed7a65a2f024d964ecf2de1bcf2911cf8a600c (patch)
tree14cc6968e4fe4fd2485c0211088b25c645a80a4b /spec/stress
parentb92c309b0f1aa0837f76ab89d6c81c36076ceca9 (diff)
downloadchef-5fed7a65a2f024d964ecf2de1bcf2911cf8a600c.tar.gz
Update to RSpec 3.
Diffstat (limited to 'spec/stress')
-rw-r--r--spec/stress/win32/file_spec.rb4
-rw-r--r--spec/stress/win32/security_spec.rb8
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/stress/win32/file_spec.rb b/spec/stress/win32/file_spec.rb
index caeab352f7..dd1dcd305e 100644
--- a/spec/stress/win32/file_spec.rb
+++ b/spec/stress/win32/file_spec.rb
@@ -26,12 +26,12 @@ describe 'Chef::ReservedNames::Win32::File', :windows_only do
it "should not leak significant memory" do
test = lambda { Chef::ReservedNames::Win32::File.symlink?(@path) }
- test.should_not leak_memory(:warmup => 50000, :iterations => 50000)
+ expect(test).not_to leak_memory(:warmup => 50000, :iterations => 50000)
end
it "should not leak handles" do
test = lambda { Chef::ReservedNames::Win32::File.symlink?(@path) }
- test.should_not leak_handles(:warmup => 50, :iterations => 100)
+ expect(test).not_to leak_handles(:warmup => 50, :iterations => 100)
end
end
diff --git a/spec/stress/win32/security_spec.rb b/spec/stress/win32/security_spec.rb
index e506b71be1..cb520e515e 100644
--- a/spec/stress/win32/security_spec.rb
+++ b/spec/stress/win32/security_spec.rb
@@ -49,21 +49,21 @@ describe 'Chef::ReservedNames::Win32::Security', :windows_only do
end
it "should not leak when retrieving and reading the ACE from a file", :volatile do
- lambda {
+ expect {
sids = Chef::ReservedNames::Win32::Security::SecurableObject.new(@monkeyfoo).security_descriptor.dacl.select { |ace| ace.sid }
GC.start
- }.should_not leak_memory(:warmup => 50, :iterations => 100)
+ }.not_to leak_memory(:warmup => 50, :iterations => 100)
end
it "should not leak when creating a new ACL and setting it on a file", :volatile do
securable_object = Security::SecurableObject.new(@monkeyfoo)
- lambda {
+ expect {
securable_object.dacl = Chef::ReservedNames::Win32::Security::ACL.create([
Chef::ReservedNames::Win32::Security::ACE.access_allowed(Chef::ReservedNames::Win32::Security::SID.Everyone, Chef::ReservedNames::Win32::API::Security::GENERIC_READ),
Chef::ReservedNames::Win32::Security::ACE.access_denied(Chef::ReservedNames::Win32::Security::SID.from_account("Users"), Chef::ReservedNames::Win32::API::Security::GENERIC_ALL)
])
GC.start
- }.should_not leak_memory(:warmup => 50, :iterations => 100)
+ }.not_to leak_memory(:warmup => 50, :iterations => 100)
end
end