[rspec-users] Controller actions do a bunch of javascript stuff...can I use spec that?

Pat Maddox pergesu at gmail.com
Mon Jan 8 06:19:18 EST 2007

I've got a form that isn't doing a regular POST...what actually
happens is that when onClick gets called, a bunch of javascript stuff
happens.  It changes the form's action to be a different URL.  Then it
polls for progress on another server, and when it's 100% reverts back
to the initial URL.

I know that sounds really ugly (and I agree it is), but that's the way
it has to be at this point.  Working with a "legacy" system.  Is there
any way I can spec that behavior with rspec?  I sort of assume not,
since it's highly dependent on JS...probably need to use jsunit for
that instead.  Still I've love to hear any ideas, as well as how I
could move more of the behavior into Ruby instead of JS.


More information about the rspec-users mailing list