I assume you are using Cucumber with webrat. WebRat does not support Ajax, for that, you would need to use Selenium.
Check out the Selenium page on the cucumber github wiki for more info. If you need additional help after that, contact me directly and I may be able to help you set it up.