[rspec-users] I met a trouble: cannot do a form post to an outside website

Newman Huang lists at ruby-forum.com
Wed Dec 3 05:11:13 EST 2008

now i use webrat for cucumber scenario testing. i have a page with a
form, which will post to a bank payment gateway. that is,

<form action="http://www.abank.com/pay/blablabla">
   <input type=submit name="sbm" value="confirm"/>

my scenario step script is:

And I press "confirm"

then I got such an error:

"No route matches "/pay/blablabla" with {:method=>:post}..."

i think webrat or rails ignore the "http://www.abank.com" prefix
automatically. and then i wrote a test script

get "http://www.abank.com/.."
puts response.body

yes, the test result proves the suspicion. i think it should be handled
in the rails testing layer. so, anybody can help me? thanks in advance.
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list