Sha256: 5242ddc3c73f47d7baddf3d08d843e625eb860a885d26c5e81c4b98c79ce7de5

Contents?: true

Size: 417 Bytes

Versions: 96

Compression:

Stored size: 417 Bytes

Contents

  it "create action should render new template when model is invalid" do
    <%= 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
    <%= class_name %>.any_instance.stubs(:valid?).returns(true)
    post :create
    response.should redirect_to(<%= item_path_for_spec('url') %>)
  end

Version data entries

96 entries across 65 versions & 14 rubygems

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