Sha256: c324473829c988a4464e3f574bda35bce9fd3b2299a0df8a0e3cc13be33b9636

Contents?: true

Size: 414 Bytes

Versions: 102

Compression:

Stored size: 414 Bytes

Contents

  context "create action" do
    should "render new template when model is invalid" do
      <%= class_name %>.any_instance.stubs(:valid?).returns(false)
      post :create
      assert_template 'new'
    end

    should "redirect when model is valid" do
      <%= class_name %>.any_instance.stubs(:valid?).returns(true)
      post :create
      assert_redirected_to <%= item_path_for_test('url') %>
    end
  end

Version data entries

102 entries across 71 versions & 13 rubygems

Version Path
aslon_scaffold-0.0.15 lib/generators/nifty/scaffold/templates/tests/shoulda/actions/create.rb
aslon_scaffold-0.0.15 lib/generators/nifty/aslon/templates/tests/shoulda/actions/create.rb
aslon_scaffold-0.0.14 lib/generators/nifty/aslon/templates/tests/shoulda/actions/create.rb
aslon_scaffold-0.0.14 lib/generators/nifty/scaffold/templates/tests/shoulda/actions/create.rb
aslon_scaffold-0.0.13 lib/generators/nifty/scaffold/templates/tests/shoulda/actions/create.rb
aslon_scaffold-0.0.13 lib/generators/nifty/aslon/templates/tests/shoulda/actions/create.rb
tripper-0.0.3d lib/generators/tripper/templates/tests/shoulda/actions/create.rb
tripper-0.0.3d lib/generators/tripper/from_community/templates/tests/shoulda/actions/create.rb
aslon_scaffold-0.0.12 lib/generators/nifty/aslon/templates/tests/shoulda/actions/create.rb
aslon_scaffold-0.0.12 lib/generators/nifty/scaffold/templates/tests/shoulda/actions/create.rb
dust-generators-0.3.3 lib/generators/dust/scaffold/templates/tests/shoulda/actions/create.rb
dust-generators-0.3.2 lib/generators/dust/scaffold/templates/tests/shoulda/actions/create.rb
dust-generators-0.3.1 lib/generators/dust/scaffold/templates/tests/shoulda/actions/create.rb
bravo-generators-0.1.1 lib/generators/bravo/scaffold/templates/tests/shoulda/actions/create.rb
scaffold_logic-2.0.0 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/create.rb
kickoff-0.0.2 lib/generators/kickoff/scaffold/templates/tests/shoulda/actions/create.rb
scaffold_logic-1.7.9 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/create.rb
scaffold_logic-1.7.8 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/create.rb
scaffold_logic-1.7.7 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/create.rb
scaffold_logic-1.7.6 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/create.rb