Rspec on javascript links

I have a lot of AJAX calls that make new divs or update information on
the
page. Is there anyway to test and if the right infomation has been
received
or displayed after an onclick action? If that makes sense?..

View this message in context:
http://www.nabble.com/rspec-on-javascript-links-tp19383154p19383154.html
Sent from the rspec-users mailing list archive at Nabble.com.

On Tue, Sep 9, 2008 at 1:21 AM, saltzmanjoelh [email protected]
wrote:

I have a lot of AJAX calls that make new divs or update information on the
page. Is there anyway to test and if the right infomation has been received
or displayed after an onclick action? If that makes sense?..

If you use RJS on the server you can use response.should have_rjs:
http://rspec.info/rdoc-rails/classes/Spec/Rails/Matchers.html#M000055
http://rspec.info/rdoc-rails/

If not, take a look at Watir or Selenium-RC

Aslak