This project is archived and is in readonly mode.

#6318 new
rgoytacaz (at gmail)

Rails 3.0.3 --skip-test-unit not working correctly.

Reported by rgoytacaz (at gmail) | January 20th, 2011 @ 02:03 PM

rails new proj_name -T or --skip-test-unit

While using generators to create a model it still does call test-unit generator.


Comments and changes to this ticket

  • xds2000

    xds2000 January 20th, 2011 @ 04:09 PM

    mac/ruby 1.9.2/rails3.0.3

    same problem:
    xiaodeshi:~/projects$ rails new sample_app --skip-testunit --skip-prototype

      create  README
      create  Rakefile
      create  .gitignore
      create  Gemfile
      create  app
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/mailers

    xiaodeshi:~/projects/sample_app$ rails g scaffold project name:string

      invoke  active_record
      create    db/migrate/20110120161558_create_projects.rb
      create    app/models/project.rb
      invoke    test_unit
      create      test/unit/project_test.rb
      create      test/fixtures/projects.yml
       route  resources :projects
      invoke  scaffold_controller
      create    app/controllers/projects_controller.rb
      invoke    erb
      create      app/views/projects
      create      app/views/projects/index.html.erb
      create      app/views/projects/edit.html.erb
      create      app/views/projects/show.html.erb
      create      app/views/projects/new.html.erb
      create      app/views/projects/_form.html.erb
      invoke    test_unit
      create      test/functional/projects_controller_test.rb
      invoke    helper
      create      app/helpers/projects_helper.rb
      invoke      test_unit
      create        test/unit/helpers/projects_helper_test.rb
      invoke  stylesheets
      create    public/stylesheets/scaffold.css
  • hemant

    hemant January 21st, 2011 @ 07:32 PM

    Working fine for me

    I couldn't replicate the issue with rails 3.0.3 tried using following ruby versions
    REE 1.8.7 patchlevel 248
    1.9.2dev (2009-07-18 trunk 24186)

    @xds2000 I guess you typed the skip option incorrectly looking at what you have posted above the correct option is --skip-test-unit
    Can you please check that ?


  • Matt Fawcett

    Matt Fawcett January 22nd, 2011 @ 01:46 AM

    Its adding the test folder for me also because config.generators.test_framework does not get set in the application.rb file. It looks like it was fixed in commit bafa153 but I can't see it in the Rails 3.03 release.

  • xds2000

    xds2000 February 20th, 2011 @ 04:21 PM

    @hemant, this is my typo issue.


    I think this behavior is not bug.

    suppose you set -T only affect creating project phase.but in developing phase,
    you generate model,the model default create test unit folder and is natural.
    if you want to use another test need add some parameters in /config/application.rb

  • rgoytacaz (at gmail)
  • rgoytacaz (at gmail)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket