Sha256: c6564d3cc02c6dce977f5d5442cd679211d38148b9ac616f200b37f6a2760e91
Contents?: true
Size: 572 Bytes
Versions: 2
Compression:
Stored size: 572 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe UsersController do include RSpec::Rails::ControllerExampleGroup it 'should return new' do get 'new' response.should render_template(:new) end it 'should behave correctly on validation errors' do post 'create', :user => {:name => ''} response.should render_template(:new) end it 'should update successfully' do User.should_receive(:model_saved) post 'create', :user => {:name => 'a lengthy name'} response.should redirect_to(users_path) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
edifice-forms-0.5.1 | spec/form_model_spec.rb |
edifice-forms-0.5.0 | spec/form_model_spec.rb |