test/caddy_test.rb in caddy-1.5.1 vs test/caddy_test.rb in caddy-1.5.2
- old
+ new
@@ -3,11 +3,11 @@
class CaddyTest < Minitest::Test
def setup
Caddy.stop
Caddy.error_handler = nil
- [:test, :test_two].each do |k|
+ [:test, :test_two, :nope].each do |k|
Caddy[k].refresher = -> {}
Caddy[k].refresh_interval = 30
Caddy[k].error_handler = nil
end
@@ -163,9 +163,15 @@
def test_requires_refesher
Caddy[:test].refresher = nil
assert_raises { Caddy.start }
+ end
+
+ def test_requires_initial_load
+ Caddy[:nope].refresher = -> { nil }
+
+ assert_raises { Caddy[:nope][:not_there] }
end
def test_requires_positive_interval
Caddy[:test].refresh_interval = -2