spec/wait_for_spec.rb in cistern-2.2.4 vs spec/wait_for_spec.rb in cistern-2.2.5
- old
+ new
@@ -43,11 +43,11 @@
service.class.timeout = 0.1
service.class.poll_interval = 0
elapsed = 0
- timeout(2) do
+ Timeout.timeout(2) do
expect do
model.wait_for! { sleep(0.2); elapsed += 0.2; elapsed > 0.2 }
end.to raise_exception(Sample::Timeout)
end
end
@@ -56,10 +56,10 @@
service.class.timeout = 1
service.class.poll_interval = 0
elapsed = 0
- timeout(2) do
+ Timeout.timeout(2) do
expect do
model.wait_for!(0.1) { sleep(0.2); elapsed += 0.2; elapsed > 0.2 }
end.to raise_exception(Sample::Timeout)
end
end