Sha256: 08a9e5d1245d0eae3036d8aa4b5c55ff782b3cf8e92734bda885299a35e266e7

Contents?: true

Size: 481 Bytes

Versions: 91

Compression:

Stored size: 481 Bytes

Contents

  it "update action should render edit template when model is invalid" do
    <%= class_name %>.any_instance.stubs(:valid?).returns(false)
    put :update, :id => <%= class_name %>.first
    response.should render_template(:edit)
  end

  it "update action should redirect when model is valid" do
    <%= class_name %>.any_instance.stubs(:valid?).returns(true)
    put :update, :id => <%= class_name %>.first
    response.should redirect_to(<%= item_path_for_spec('url') %>)
  end

Version data entries

91 entries across 60 versions & 14 rubygems

Version Path
aslon_scaffold-0.0.15 lib/generators/nifty/scaffold/templates/tests/rspec/actions/update.rb
aslon_scaffold-0.0.15 lib/generators/nifty/aslon/templates/tests/rspec/actions/update.rb
aslon_scaffold-0.0.14 lib/generators/nifty/scaffold/templates/tests/rspec/actions/update.rb
aslon_scaffold-0.0.14 lib/generators/nifty/aslon/templates/tests/rspec/actions/update.rb
aslon_scaffold-0.0.13 lib/generators/nifty/aslon/templates/tests/rspec/actions/update.rb
aslon_scaffold-0.0.13 lib/generators/nifty/scaffold/templates/tests/rspec/actions/update.rb
tripper-0.0.3d lib/generators/tripper/from_community/templates/tests/rspec/actions/update.rb
tripper-0.0.3d lib/generators/tripper/templates/tests/rspec/actions/update.rb
aslon_scaffold-0.0.12 lib/generators/nifty/scaffold/templates/tests/rspec/actions/update.rb
aslon_scaffold-0.0.12 lib/generators/nifty/aslon/templates/tests/rspec/actions/update.rb
dust-generators-0.3.3 lib/generators/dust/scaffold/templates/tests/rspec/actions/update.rb
dust-generators-0.3.2 lib/generators/dust/scaffold/templates/tests/rspec/actions/update.rb
dust-generators-0.3.1 lib/generators/dust/scaffold/templates/tests/rspec/actions/update.rb
bootstrapped-2.0.4 lib/generators/bootstrapped/scaffold/templates/tests/rspec/actions/update.rb
bootstrapped-2.0.3 lib/generators/bootstrapped/scaffold/templates/tests/rspec/actions/update.rb
bravo-generators-0.1.1 lib/generators/bravo/scaffold/templates/tests/rspec/actions/update.rb
bootstrapped-1.0.1 lib/generators/bootstrapped/scaffold/templates/tests/rspec/actions/update.rb
bootstrapped-1.0.0 lib/generators/bootstrapped/scaffold/templates/tests/rspec/actions/update.rb
bootstrapped-0.9.0 lib/generators/bootstrapped/scaffold/templates/tests/rspec/actions/update.rb
kickoff-0.0.2 lib/generators/kickoff/scaffold/templates/tests/rspec/actions/update.rb