spec/lib/bluepill/system_spec.rb in bluepill-0.0.62 vs spec/lib/bluepill/system_spec.rb in bluepill-0.0.63

- old
+ new

@@ -1,14 +1,14 @@ describe Bluepill::System do describe :pid_alive? do it "should be true if process responds to zero signal" do - mock(::Process).kill(0, 555) + Process.should_receive(:kill).with(0, 555).and_return(0) Bluepill::System.should be_pid_alive(555) end it "should be false if process throws exception on zero signal" do - mock(::Process).kill(0, 555) { raise Errno::ESRCH.new } + Process.should_receive(:kill).with(0, 555).and_raise(Errno::ESRCH) Bluepill::System.should_not be_pid_alive(555) end end describe :store do @@ -31,6 +31,6 @@ Bluepill::System.store[:anotherkey] = Faker::Lorem.sentence Bluepill::System.reset_data Bluepill::System.store.should be_empty end end -end \ No newline at end of file +end