Forum: Ruby on Rails How to get raw_post in functional tests

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3dd4b52a0946bd698b1d1635a46ea3a3?d=identicon&s=25 francois.beausoleil (Guest)
on 2005-11-27 16:39
(Received via mailing list)
Hi !

I'm testing PayPal integration, and am using the Paypal gem.  The
Paypal gem requires the raw POST data, and not the pre-munged version
that Rails uses.

Running in dev mode, everything works fine, but in the tests, I can't
seem to get at the data.

I did:
class ActionController::TestRequest < AbstractRequest #:nodoc:
  def raw_post
    raise "RAW_POST Request"
  end
end

but I never see this exception raised ?!

Anyone has a tip ?

Thanks !
This topic is locked and can not be replied to.