我已经用 wash_out 实现了一个 Rails Controller gem 。
我的 Controller 看起来像这样:
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
路线.rb:
MyApp::Application.routes.draw do
wash_out :test
end
我不确定如何使用 Rspec 测试此 Controller 。
有任何想法吗?
最佳答案
在此链接中,您可以找到一个很好的方法 http://blog.johnsonch.com/2013/04/18/rails-3-soap-and-testing-oh-my/
方法是:
关于ruby-on-rails - 如何使用 Rspec 测试wash_out Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11540135/