-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To be used in one of two ways: post_it '/', :foo => 'bar', :env => { :agent => 'Mac Intel' } or post_it '/', '<myxml></myxml>', :agent => 'Mac Intel' to receive this in your EventContext For query params: post '/' do params.inspect end For XML/JSON/etc.. : post '/' do request.body.string end
- Loading branch information
Blake Mizerany
committed
Apr 10, 2008
1 parent
d3f824c
commit 307f93c
Showing
4 changed files
with
44 additions
and
27 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
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,16 @@ | |||
require File.dirname(__FILE__) + '/helper' | |||
|
|||
context "RESTful tests" do | |||
|
|||
specify "should take xml" do | |||
post '/foo.xml' do | |||
request.body.string | |||
end | |||
|
|||
post_it '/foo.xml', '<myxml></myxml>' | |||
assert ok? | |||
assert_equal('<myxml></myxml>', body) | |||
end | |||
|
|||
end | |||
|