Skip to content

Instantly share code, notes, and snippets.

@dchelimsky
Forked from josevalim/macro_stubs.rb
Created March 14, 2009 07:35
Show Gist options
  • Save dchelimsky/79012 to your computer and use it in GitHub Desktop.
Save dchelimsky/79012 to your computer and use it in GitHub Desktop.
describe ProjectsController do
describe :get => :show, :id => '37' do
expects :find, :on => Project, :with => { :id => '37' }, :returns => mock_project
assigns :project
describe "mime XML" do
mime Mime::XML
#
end
end
describe :delete => :destroy, :id => '37' do
expects :find, :on => Project, :with => { :id => '37' }, :returns => mock_project
expects :destroy, :on => mock_project, :returns => true
assigns :project
redirects_to { projects_url }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment