我试图在我的Rails应用程序上使用Rsec测试一些非常简单的东西.
这是spec/controllers/movies_controller_spec.rb中的测试代码段
describe MoviesController do
describe 'update' do
it 'should call the model method to look up the movie to update' do
Movie.should_receive(:find).with("3")
put :update, {:id => "3"}
end
end
Run Code Online (Sandbox Code Playgroud)
这是controllers/movies_controller.rb中的控制器方法:
def update
Movie.find(params[:id])
end
Run Code Online (Sandbox Code Playgroud)
我遇到了这个问题:
1) MoviesController update should call the model method to look up the movie to update Failure/Error: post :update, {:id => "3"} ActionView::MissingTemplate: Missing template movies/update, application/update with {:handlers=>[:erb, :builder, :coffee, :haml], :formats=>[:html], :locale=>[:en, :en]}. Searched in: * "#<RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator:0xa65b300>" # ./spec/controllers/movies_controller_spec.rb:8:in `block (3 levels) in …Run Code Online (Sandbox Code Playgroud) 我有一个问题:我们正在尝试使用Apache CXF实现WS-Addressing.我可以设置一些像To或Action这样的标题,但我找不到设置其他像From,ReplyTo或FaultTo的方法.
有谁知道怎么做?