views:

19

answers:

2

How can I test a .js.rjs response in rails(2.3.8) functional test ?

A: 

You can take the simple path and verify the contents being returned seem correct with a functional test.

However, you'll probably get a lot more value from something like Capybara and Celerity that will let you do real integration testing with a live JavaScript engine and verify the RJS causes the page behave you expect.

http://github.com/jnicklas/capybara/blob/master/README.rdoc

Winfield
A: 

There's assert_select_rjs in case you weren't aware of it (like I was). Its something like an assert_tag for RJS output.

Suan