Rails 3 testing with xhr

I have a whole load of tests in a Rails 2.3.x project that I'm shifting to Rails 3. Some of the functional tests are using xhr(parameters) to test ajax calls. But in Rails 3 assert_select 'something' does work with whatever comes back from xhr. If I look at the @response.body, e.g. puts @response.body, then everything I expect to be there is there. If I change from using xhr to just plain get or post or whatever, then assert_select works again. So it all seems fine expect that assert_select can't use whatever comes back from an xhr call.

Anyone have any idea what's going on here?


John Small