spec/plugin/multi_route_spec.rb in roda-2.29.0 vs spec/plugin/multi_route_spec.rb in roda-3.0.0

- old
+ new

@@ -1,6 +1,6 @@ -require File.expand_path("spec_helper", File.dirname(File.dirname(__FILE__))) +require_relative "../spec_helper" describe "multi_route plugin" do before do app(:bare) do plugin :multi_route @@ -169,15 +169,17 @@ body('/post').must_equal 'postd' end end describe "multi_route plugin" do - deprecated "r.multi_route works even without routes defined" do + it "r.multi_route raises error for invalid namespace" do app(:multi_route) do |r| + r.is('a'){r.multi_route('foo')} r.multi_route 'a' end - body.must_equal 'a' + proc{body}.must_raise Roda::RodaError + proc{body('/a')}.must_raise Roda::RodaError end end describe "multi_route plugin" do before do