[rspec-users] testing ajax responder actions
Ed Howland
ed.howland at gmail.com
Fri Feb 9 11:49:35 EST 2007
On 2/8/07, Jerry West <jerry.west at ntlworld.com> wrote:
>
> Kevin,
>
> You can use #xhr instead of #get or #post, thus...
>
> xhr :post, :create, :id => etc...
>
> this will send something that the controller is able to recognise as an
> AJAX request.
This part seems to work, but when I do:
controller.should_render_rjs :replace_html 'div_id', 'some text'
I get nil does not respond to 'rjs' or 'has_rjs'
Any help would be appreciated.
Thanks
>
> #xhr is inherited from the original Rails test framework, but rather taken
> for granted in the Rspec docs (I'll submit a request to improve them).
>
> Hope this helps,
> Jerry
>
> Kevin Williams wrote:
> I have an Ajax responder method which uses respond_to to make sure it
> only works with Ajax. I'm having trouble figuring out how to call this
> action successfully. I'm using Rails 1.2.x. Any thoughts?
>
>
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
--
Ed Howland
http://greenprogrammer.blogspot.com
More information about the rspec-users
mailing list