Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
describe ProjectsController do
describe "responding to GET show" do
receives :find, :on => Project, :with => { :id => '37' }, :and_returns => mock_project
get :show, :id => '37'
should_assign_to(:project)
describe "mime XML" do
mime Mime::XML
#
end
end
describe "responding to DELETE destroy" do
receives :find, :on => Project, :with => { :id => '37' }, :and_returns => mock_project
receives :destroy, :on => mock_project, :and_returns => true
delete :destroy, :id => '37'
should_assign_to(:project)
should_redirect_to { projects_url }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.