Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 4b554ece66
Fetching contributors…

Cannot retrieve contributors at this time

58 lines (57 sloc) 1.81 kb
# require File.dirname(__FILE__) + '/../spec_helper'
#
# describe CompaniesController do
# fixtures :all
# render_views
#
# it "index action should render index template" do
# get :index
# response.should render_template(:index)
# end
#
# it "show action should render show template" do
# get :show, :id => Company.first
# response.should render_template(:show)
# end
#
# it "new action should render new template" do
# get :new
# response.should render_template(:new)
# end
#
# it "create action should render new template when model is invalid" do
# Company.any_instance.stubs(:valid?).returns(false)
# post :create
# response.should render_template(:new)
# end
#
# it "create action should redirect when model is valid" do
# Company.any_instance.stubs(:valid?).returns(true)
# post :create
# response.should redirect_to(company_url(assigns[:company]))
# end
#
# it "edit action should render edit template" do
# get :edit, :id => Company.first
# response.should render_template(:edit)
# end
#
# it "update action should render edit template when model is invalid" do
# Company.any_instance.stubs(:valid?).returns(false)
# put :update, :id => Company.first
# response.should render_template(:edit)
# end
#
# it "update action should redirect when model is valid" do
# Company.any_instance.stubs(:valid?).returns(true)
# put :update, :id => Company.first
# response.should redirect_to(company_url(assigns[:company]))
# end
#
# it "destroy action should destroy model and redirect to index action" do
# company = Company.first
# delete :destroy, :id => company
# response.should redirect_to(companies_url)
# Company.exists?(company.id).should be_false
# end
# end
Jump to Line
Something went wrong with that request. Please try again.