test/outpost/expectations/response_time_test.rb in outpost-0.2.3 vs test/outpost/expectations/response_time_test.rb in outpost-0.2.4
- old
+ new
@@ -12,9 +12,16 @@
end
extend Outpost::Expectations::ResponseTime
end
+ describe ".evaluation_response_time with nil" do
+ it "should fail gracefully" do
+ #this is common, as host can be not accessible for ping
+ refute SubjectTime.evaluate_response_time(build_stub(:response_time => nil), :less_than => 400)
+ end
+ end
+
describe ".evaluate_response_time with less_than" do
it "should return true when it matches" do
assert SubjectTime.evaluate_response_time(scout_stub, :less_than => 5000)
end