Sha256: 09d929507b33b7e0a9eb8cd0f5b0e60c595fefe318809c4c8ae263659138a6f5
Contents?: true
Size: 803 Bytes
Versions: 6
Compression:
Stored size: 803 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe <%= user_plural_class_name %>Controller do fixtures :all integrate_views 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 <%= user_class_name %>.any_instance.stubs(:valid?).returns(false) post :create response.should render_template(:new) end it "create action should redirect when model is valid" do <%= user_class_name %>.any_instance.stubs(:valid?).returns(true) post :create response.should redirect_to("/") <%- unless options[:authlogic] -%> session['<%= user_singular_name %>_id'].should == assigns['<%= user_singular_name %>'].id <%- end -%> end end
Version data entries
6 entries across 6 versions & 3 rubygems