forked from sinatra/sinatra
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Symbol params back in thanks to Jeremy Evans
- Loading branch information
Blake Mizerany
committed
Apr 8, 2008
1 parent
74bfd99
commit 98572b4
Showing
2 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require File.dirname(__FILE__) + '/helper' | ||
|
||
context "Symbol Params" do | ||
|
||
setup do | ||
Sinatra.application = nil | ||
end | ||
|
||
specify "should be accessable as Strings or Symbols" do | ||
get '/' do | ||
params[:foo] + params['foo'] | ||
end | ||
|
||
get_it '/', :foo => "X" | ||
assert_equal('XX', body) | ||
end | ||
|
||
end | ||
|