#70 ✓ resolved
webmat

helper for test_unit never created

Reported by webmat | March 7th, 2008 @ 05:45 PM | in 1.0

1 - On a brand new merb app, I set use_test :test_unit.

2 - I create a dummy controller, then a dummy model.

-- No test_helper is created.

Comments and changes to this ticket

  • webmat

    webmat March 7th, 2008 @ 05:50 PM

    Note that I tried that on the 0.9.1 developer gem as well as on a gem created from source

    (commit d58d7ed55ab2363c93c5e12c40a75f7e5e54f595, the merge from 2008-03-07 01:11:16)

  • Ezra Zygmuntowicz

    Ezra Zygmuntowicz March 24th, 2008 @ 05:52 PM

    • State changed from “new” to “open”

    does someone who uses test_unit want to make a patch for this?

  • Ben Burkert

    Ben Burkert March 26th, 2008 @ 09:43 AM

    related to my comments on #71.

  • webmat

    webmat March 27th, 2008 @ 05:41 AM

    As suggested in #71, I added merb_test_unit, which added rake tasks for Test::Unit.

    However, even after generating a new model, the test_helper is not created. So the test_unit task fails because the auto-generated unit test depends on test/test_helper.

    I even started another dummy project from scratch, immediately set up "use_test :test_unit" and "require 'merb_test_unit'", then generated a controller and a model and the helper was not created.

  • Michael Klishin (antares)
  • Paul Legato

    Paul Legato July 1st, 2008 @ 07:16 PM

    • Tag set to bug, generator, merb_test_unit

    The following test_helper.rb works for me. I didn't make a patch because I'm not sure where to put it in the codebase so that it's auto-generated while not clobbering an existing test_helper.rb.

    require 'rubygems'
    require 'merb-core'
    
    Merb.start_environment(:testing => true, :adapter => 'runner', :environment => ENV['MERB_ENV'] || 'test')
    
    gem 'merb_test_unit'
    require 'merb_test_unit'
    
  • Michael Klishin (antares)

    Michael Klishin (antares) September 6th, 2008 @ 03:21 AM

    • Assigned user set to “Michael Klishin (antares)”
  • Michael Klishin (antares)

    Michael Klishin (antares) October 5th, 2008 @ 08:00 AM

    • State changed from “open” to “resolved”

    test/test_unit is now generated, I just triple checked it. I am not sure if it is really what it should look like but it's because I do not use Test::Unit myself and I could not find anyone who does on the IRC.

    Let me know how we should change it.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

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

Shared Ticket Bins

Pages