One of my current projects is using RubyAMF to communicate with Flash (http://rubyforge.org/projects/rubyamf/). On the whole this is really nice because it allows you to transfer Ruby objects directly to ActionScript ones (as opposed to translating the object into XML, sending the XML and then recreating the object in ActionScript).
However, Rails does not provide a built in transport mechanism for AMF, so we cannot run functional testing directly on the data call (as we could for an XML or HTML transport layer). This is a show stopper for a lot of people (Rails w/o Unit testing = a big mess of trouble when something goes wrong).
We can though serve both the HTML and the AMF formats depending on the request format. This means that we can test the object instantiation logic and make sure there are no errors in the controllers (though we cannot check the actual format of the data being served).
In the controller, instead of rendering AMF alone, do the following
respond_to do |format|
format.html {render :text => ""}
format.amf { render :amf => @photo }
end
Note: You will have to give the variable object instance scope using the @ sign so we can test for it
Then in the unit test file, you can test in the following manner
def test_get_photo
get :get_photo
assert_not_nil assigns(:photo)
assert_response :success
end
So you can at least test that the object got instantiated and no errors were generated.