I recently ran into some problems when upgrading an application from Rails 1.1 to Rails 1.2. RJS tests (using ARTS) that previously worked fine suddenly started failing (cannot find X in response, when I could see X in the response, right in front of me).
def assert_rjs(action, *args, &block)
assert @response.body.to_s.index(create_generator.send(action, *args, &block)), generic_error(action, args)
In other words, instead of splitting into lines and looking for an exact match, I simply examine the entire response body for the fragment. I have reported this to Kevin Clark (he says he has had no problems with edge rails, but maybe that has changed again since 1.2); however, if you are experiencing weirdness try editing the assert_rjs method in arts/lib/arts.rb as described above.