test/all.rb in syro-3.1.1 vs test/all.rb in syro-3.2.0

- old
+ new

@@ -115,10 +115,14 @@ on "path" do run(path_info) end end +exception = Syro.new do + get { res.text(this_method_does_not_exist) } +end + app = Syro.new do get do res.write "GET /" end @@ -258,10 +262,14 @@ end on "script" do run(script_name) end + + on "exception" do + run(exception) + end end setup do Driver.new(app) end @@ -440,6 +448,13 @@ test "script name and path info" do |f| f.get("/script/path") assert_equal 200, f.last_response.status assert_equal "/script/path", f.last_response.body +end + +test "deck exceptions reference a named class" do |f| + f.get("/exception") +rescue NameError => exception +ensure + assert exception.to_s.include?("Syro::Deck") end