Skip to content

Instantly share code, notes, and snippets.

@zdennis
Created August 1, 2008 17:52
Show Gist options
  • Save zdennis/3651 to your computer and use it in GitHub Desktop.
Save zdennis/3651 to your computer and use it in GitHub Desktop.
class Surveys::ReportController < ApplicationController
def show
Survey.find()
end
end
require File.dirname(__FILE__) + '/../../spec_helper'
describe Surveys::ReportController do
it "should description" do
Survey.should_receive(:find)
get :show, "survey_id" => 1
end
end
ActionController::Routing::Routes.draw do |map|
map.resources :surveys do |surveys|
surveys.resource :report, :controller => "surveys/report"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment