Sha256: c5214ee2b180967473eabdcd1c60605a5300977209d8b4441ada36a10e8d1d9a
Contents?: true
Size: 614 Bytes
Versions: 25
Compression:
Stored size: 614 Bytes
Contents
require File.expand_path("helper", File.dirname(__FILE__)) setup do { "SCRIPT_NAME" => "/", "PATH_INFO" => "/about/1/2" } end test "paths and numbers" do |env| Cuba.define do on "about" do on :one, :two do |one, two| res.write one res.write two end end end _, _, resp = Cuba.call(env) assert_response resp, ["1", "2"] end test "paths and decimals" do |env| Cuba.define do on "about" do on(/(\d+)/) do |one| res.write one end end end env["PATH_INFO"] = "/about/1.2" _, _, resp = Cuba.call(env) assert_response resp, [] end
Version data entries
25 entries across 25 versions & 1 rubygems