Sha256: 3338c3128a90bb45e6f568cf509443d58f31ff5226f0c3e53a1bbe0c49f94920
Contents?: true
Size: 489 Bytes
Versions: 5
Compression:
Stored size: 489 Bytes
Contents
require File.expand_path("spec_helper", File.dirname(File.dirname(__FILE__))) describe "unescape_path_path plugin" do it "decodes URL-encoded routing path" do app(:unescape_path) do |r| r.on 'b' do r.get /(.)/ do |a| "#{a}-b" end end r.get :name do |name| name end end body('/a').must_equal 'a' body('/%61').must_equal 'a' body('%2f%61').must_equal 'a' body('%2f%62%2f%61').must_equal 'a-b' end end
Version data entries
5 entries across 5 versions & 1 rubygems