Skip to content

Instantly share code, notes, and snippets.

@mhfs
Created November 1, 2009 00:16
Show Gist options
  • Save mhfs/223327 to your computer and use it in GitHub Desktop.
Save mhfs/223327 to your computer and use it in GitHub Desktop.
def index
@assets = current_account.assets.paginate :page => params[:page], :per_page => 10
end
# How to spec this???
# controller action ..
def index
@tasks = Task.all
end
# spec ....
describe :get => :index do
expects :find, :on => Task, :with => :all, :returns => mock_task
should_assign_to :tasks, :with => mock_task
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment