aboutsummaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2013-09-10 08:56:24 +0200
committerGibheer <gibheer@gmail.com>2013-09-10 08:56:24 +0200
commit3e0a3f20a79330f1f152a5f3667b29cb904d959c (patch)
tree9190f9a14a2a823c05025eb1bbc1aec47a2fdfbe /spec/unit
parentdefb7703c69d1e4f756254723d50997fb8dc63da (diff)
allow a dash in the middle url part
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/zero/router/call_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/zero/router/call_spec.rb b/spec/unit/zero/router/call_spec.rb
index 923b747..835d51d 100644
--- a/spec/unit/zero/router/call_spec.rb
+++ b/spec/unit/zero/router/call_spec.rb
@@ -103,4 +103,17 @@ describe Zero::Router, '#call' do
it_behaves_like "a sample app"
end
+
+ context 'with a dash in the variable' do
+ let(:routes) { {'/:id' => app} }
+ let(:env) { EnvGenerator.get('/foo-bar') }
+ let(:app) do
+ lambda do |env|
+ [200, content_type, [Zero::Request.new(env).params['id']]]
+ end
+ end
+ let(:result) { ['foo-bar'] }
+
+ it_behaves_like "a sample app"
+ end
end