Sha256: b035b32dd52a6ac5e268b60407c28604635a1043d5a2ce763b0326172374e69a

Contents?: true

Size: 305 Bytes

Versions: 15

Compression:

Stored size: 305 Bytes

Contents

  it 'posts create action and renders new template when model is invalid' do
    <%= class_name %>.any_instance.stubs(:save).returns(false)
    post :create
    response.should render_template(:new)
  end

  it 'posts create action and redirects' do
    post :create
    response.should be_redirect
  end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
scaffold_logic-2.0.0 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.7.9 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.7.8 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.7.7 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.7.6 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.7.5 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.7.4 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.7.3 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.7.2 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.7.1 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.7.0 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.6.3 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.6.2 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.6.1 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb
scaffold_logic-1.6.0 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/create.rb