require "spec_helper" describe "User Error" do isolate :conveyors, :router, before: :all before :all do rad.delete :conveyors rad.conveyors.web do |web| web.use Rad::Controller::Processors::ControllerCaller end class ::SomeModel def self.find! id id.should == 'some id' SomeModel.new end end end after :all do remove_constants %w(SomeModel ControllerSpec) end it "user error" do class ::ControllerSpec inherit Rad::Controller::Http prepare_model SomeModel, id: :some_model, variable: 'some_model' def action @some_model.should_not == nil render inline: 'ok' end end ccall(ControllerSpec, :action, some_model: 'some id').should == 'ok' end end