Hi,

I realize that integration tests are supposed to be high-level and deal
with what the user really sees on their end, but say you have a form
that integrates via ajax with a payment service like chargify--  Even
though that service may have a "sandbox" environment that you can post
to, I would rather not my requests specs go out and actually hit the
wire...

So, my question is, what is the proper way to stub out something like
this?  Is it to do something hacky like:

page.evaluate_script "$('#form_for_chargify').submit(function() {
window.location = '<<some path where a user is redirected to upon successful 
payment>>'; return false; }

Is there a better way to do this?

Thanks.

Patrick J. Collins
http://collinatorstudios.com

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to