Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9135 for ousted

Show
Ignore:
Timestamp:
03/29/08 20:30:38 (4 months ago)
Author:
bitsweat
Message:

Add a note about testing xml-rpc [Alex Young]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • ousted/actionwebservice/README

    r2909 r9135  
    262262the PersonController, and returns the result. 
    263263 
     264If you're not using SOAP (or you're having serialisation difficulties),  
     265you can test XMLRPC like this: 
     266 
     267  class PersonApiControllerTest < Test::Unit::TestCase 
     268    def setup 
     269      @controller = PersonController.new 
     270      @request    = ActionController::TestRequest.new 
     271      @response   = ActionController::TestResponse.new 
     272 
     273      @protocol   = :xmlrpc # can also be :soap, the default 
     274    end 
     275 
     276    def test_add 
     277      result = invoke :remove, 1 # no change here 
     278      assert_equal true, result 
     279    end 
     280  end 
    264281 
    265282=== Scaffolding