Sha256: faafceb644e9b8fb823c30ee1fc2270e53a3c6acf48ea061a21d4dd8aa1328ef

Contents?: true

Size: 385 Bytes

Versions: 15

Compression:

Stored size: 385 Bytes

Contents

  it 'puts update action and renders edit template when model is invalid' do
    <%= class_name %>.any_instance.stubs(:save).returns(false)
    put :update, :id => 1
    response.should render_template(:edit)
  end

  it 'puts update action and redirects' do
    <%= class_name %>.any_instance.stubs(:save).returns(true)
    put :update, :id => 1
    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/update.rb
scaffold_logic-1.7.9 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.7.8 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.7.7 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.7.6 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.7.5 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.7.4 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.7.3 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.7.2 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.7.1 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.7.0 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.6.3 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.6.2 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.6.1 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb
scaffold_logic-1.6.0 lib/generators/scaffold_logic/scaffold/templates/tests/rspec/actions/update.rb