Sha256: fc5c892e77a7fd202ea1c7ed44d092b6d907910042d4d11d755ef2b565c0fd23

Contents?: true

Size: 310 Bytes

Versions: 114

Compression:

Stored size: 310 Bytes

Contents

  def test_create_invalid
    <%= class_name %>.any_instance.stubs(:valid?).returns(false)
    post :create
    assert_template 'new'
  end

  def test_create_valid
    <%= class_name %>.any_instance.stubs(:valid?).returns(true)
    post :create
    assert_redirected_to <%= item_path_for_test('url') %>
  end

Version data entries

114 entries across 83 versions & 14 rubygems

Version Path
nifty-generators-improved-0.5 lib/generators/nifty/scaffold/templates/tests/testunit/actions/create.rb
flockonus-nifty-generators-0.0.12 lib/generators/nifty/scaffold/templates/tests/testunit/actions/create.rb
flockonus-nifty-generators-0.0.12 rails_generators/nifty_scaffold/templates/tests/testunit/actions/create.rb
zoo-generators-0.1.5 lib/generators/zoo/scaffold/templates/tests/testunit/actions/create.rb
zoo-generators-0.1.4 lib/generators/zoo/scaffold/templates/tests/testunit/actions/create.rb
zoo-generators-0.1.3 lib/generators/zoo/scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.6 rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.6 lib/generators/dust/scaffold/templates/tests/testunit/actions/create.rb
zoo-generators-0.1.2 lib/generators/zoo/scaffold/templates/tests/testunit/actions/create.rb
zoo-generators-0.1.1 lib/generators/zoo/scaffold/templates/tests/testunit/actions/create.rb
zoo-generators-0.1.0 lib/generators/zoo/scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.5 rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.5 lib/generators/dust/scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.4 rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.4 lib/generators/dust/scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.3 lib/generators/dust/scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.3 rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.2 lib/generators/dust/scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.2 rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.2.1 rails_generators/dust_scaffold/templates/tests/testunit/actions/create.rb