spec/plugin/hooks_spec.rb in roda-2.5.1 vs spec/plugin/hooks_spec.rb in roda-2.6.0
- old
+ new
@@ -90,6 +90,14 @@
s.must_equal 201
h['foo'].must_equal 'bar'
b.join.must_equal 'foo'
@a.must_equal [[200, 'bar', ['foo']]]
end
+
+ it "handles halt in before blocks" do
+ app.before do
+ response.status = 200
+ request.halt
+ end
+ status.must_equal 201
+ end
end