Created
September 12, 2008 17:50
-
-
Save mlangenberg/10481 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
From f88f4f56eeaf1f4a0f66dae3933147d10e971aea Mon Sep 17 00:00:00 2001 | |
From: Matthijs Langenberg <[email protected]> | |
Date: Fri, 12 Sep 2008 17:16:20 +0200 | |
Subject: [PATCH] Added two specs for setting request.raw_post. Passes for #dispatch_to, fails for #request. | |
--- | |
spec/public/test/request_helper_spec.rb | 10 ++++++++++ | |
1 files changed, 10 insertions(+), 0 deletions(-) | |
diff --git a/spec/public/test/request_helper_spec.rb b/spec/public/test/request_helper_spec.rb | |
index 7131c46..4e9b5f2 100644 | |
--- a/spec/public/test/request_helper_spec.rb | |
+++ b/spec/public/test/request_helper_spec.rb | |
@@ -65,6 +65,11 @@ describe Merb::Test::RequestHelper do | |
controller.params[:action].should == "show" | |
end | |
+ | |
+ it "should support setting request.raw_post" do | |
+ controller = dispatch_to(@controller_klass, :show, {}, {:post_body => 'some XML'}) | |
+ controller.request.raw_post.should == 'some XML' | |
+ end | |
end | |
describe "#dispatch_with_basic_authentication_to" do | |
@@ -213,6 +218,11 @@ describe Merb::Test::RequestHelper do | |
end | |
end | |
+ it "should support setting request.raw_post" do | |
+ controller = request("/namespaced/spec_helper_controller", {}, {:post_body => 'some XML'}) | |
+ controller.request.raw_post.should == 'some XML' | |
+ end | |
+ | |
it "should get namespaced index action" do | |
Merb::Test::ControllerAssertionMock.should_receive(:called).with(:index) | |
controller = request("/namespaced/spec_helper_controller") | |
-- | |
1.5.5.3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment