Skip to content

Instantly share code, notes, and snippets.

@bkempner
Created August 15, 2011 07:49
Show Gist options
  • Save bkempner/1145868 to your computer and use it in GitHub Desktop.
Save bkempner/1145868 to your computer and use it in GitHub Desktop.
## spec
it '#index' do
mock(controller).index
get :index
response.should be_success
end
## controller
def index
@clients = Client.all
render :json => @clients
end
1) ClientsController is restful: #index
Failure/Error: get :index
ActionView::MissingTemplate:
Missing template clients/index with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml, :haml], :formats=>[:html], :locale=>[:en, :en]} in view paths "#<RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator:0x0000010291e418>"
# ./spec/controllers/clients_controller_spec.rb:13:in `block (3 levels) in <top (required)>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment