ultravisor/spec/ultravisor/run_spec.rb in service_skeleton-2.1.0 vs ultravisor/spec/ultravisor/run_spec.rb in service_skeleton-2.2.0

- old
+ new

@@ -67,17 +67,17 @@ expect(ultravisor.instance_variable_get(:@children).first.last).to receive(:shutdown) ultravisor.run end - context "that terminates" do + context "when the child terminates" do before(:each) do allow(ultravisor.instance_variable_get(:@queue)).to receive(:pop).and_return(child, :shutdown) allow(ultravisor).to receive(:sleep) end - context "within the limits of its restart policy" do + context "when in the limits of its restart policy" do it "spawns the child again" do expect(child).to receive(:spawn).exactly(:twice) ultravisor.run end @@ -87,10 +87,10 @@ ultravisor.run end end - context "too often for its restart policy" do + context "when it terminates too often for its restart policy" do before(:each) do allow(child).to receive(:restart?).and_raise(Ultravisor::BlownRestartPolicyError) allow(logger).to receive(:error) end