Sha256: 895db659f22f913f8308421d2e4870463e231e7d74459f399aafeeda87df6956
Contents?: true
Size: 635 Bytes
Versions: 2
Compression:
Stored size: 635 Bytes
Contents
require File.expand_path("helper", File.dirname(__FILE__)) test "matching an empty segment" do Cuba.define do on "" do res.write req.path end end env = { "SCRIPT_NAME" => "", "PATH_INFO" => "/" } _, _, resp = Cuba.call(env) assert_response resp, ["/"] end test "nested empty segments" do Cuba.define do on "" do on "" do on "1" do res.write "IT WORKS!" res.write req.path end end end end env = { "SCRIPT_NAME" => "", "PATH_INFO" => "///1" } _, _, resp = Cuba.call(env) assert_response resp, ["IT WORKS!", "///1"] end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cuba-3.0.0.rc4 | test/root.rb |
cuba-3.0.0.rc3 | test/root.rb |