我已经使用wash_out gem 实现了一个Rails控制器.
我的控制器看起来像这样:
class TestController < ApplicationController
include WashOut::SOAP
soap_action "int_to_string",
:args => :integer,
:return => :string
def int_to_string
render :soap => params[:value].to_s
end
end
Run Code Online (Sandbox Code Playgroud)
routes.rb中:
MyApp::Application.routes.draw do
wash_out :test
end
Run Code Online (Sandbox Code Playgroud)
我不知道如何用Rspec测试这个控制器.
有任何想法吗?