Topic: Some wierdness after upgrading to 1.2 RC (

Over the weekend I upgraded to the 1.2 release candidate and spent most of the time dealing with the new deprecation warnings, etc.

However my testing woes have increased -- where before I could get my tests to pass with either autotest or rake test (but not both), now there seems to be a third case -- rake test behaves differently than ruby test/test_helper.rb test/models/some_model_test.rb.

I have a test that falls in the rake test case, but passes when run from test_helper.  However, only the first 5 out of 10 tests run when run from test_helper....  Its not seeing the other test methods, but its not erroring out either.

The typical cause I've found for autotest and rake test to behave differently is due to fixture load issues and I wouldn't be surprised if that's the case here too, but I haven't been able to identify which fixture is not being dropping/recreated, which was why I tried dropping to the single test case -- less noise in the log to sort though, etc.... But now the problem test isn't being run....

Has anyone seen anything like this?

My RoR journey  -- thoughts on learning RoR and lessons learned in applying TDD and agile practices.

Re: Some wierdness after upgrading to 1.2 RC (

Here's one specific case of the wierdness:

[karse:~/ruby-work/compinabox] nielsene% ruby test/test_helper.rb test/controllers/admin/competition_controller_styles_prepopulated_test.rb 
Loaded suite test/test_helper
Finished in 0.29834 seconds.

5 tests, 0 assertions, 0 failures, 0 errors

So its detecting the tests, but its not finding any of the assertions...  Under autotest -rails or rake:test:controllers, it picks up the assertions, but it exhibits a Heisenbug while tests failling at random...

Here's the complete test case

require File.dirname(__FILE__) + '/../../test_helper'
require File.dirname(__FILE__) + '/admin_controller_abstract_test'

class Admin::CompetitionControllerStylePrepopulateTest < Admin::CompetitionControllerAbstractTest
  fixtures :dances, :styles, :style_offerings

  def test_standard_prepopulated
    post :new_style, {:short_name=>competitions(:mit_open).short_name,
                      :new_style => {:name=>"Standard", :family=>"International"}}

    standard = Style.find_by_name_and_competition_id("Standard",competitions(:mit_open).id)
    assert_equal 5, standard.dances.count

  def test_latin_prepopulated
    post :new_style, {:short_name=>competitions(:mit_open).short_name,
                      :new_style => {:name=>"Latin", :family=>"International"}}

    latin = Style.find_by_name_and_competition_id("Latin",competitions(:mit_open).id)
    assert_equal 5, latin.dances.count

  def test_smooth_prepopulated
    post :new_style, {:short_name=>competitions(:mit_open).short_name,
                      :new_style => {:name=>"Smooth", :family=>"American"}}

    smooth = Style.find_by_name_and_competition_id("Smooth",competitions(:mit_open).id)
    assert_equal 4, smooth.dances.count

  def test_rhythm_prepopulated
    post :new_style, {:short_name=>competitions(:mit_open).short_name,
                      :new_style => {:name=>"Rhythm", :family=>"American"}}

    smooth = Style.find_by_name_and_competition_id("Rhythm",competitions(:mit_open).id)
    assert_equal 5, smooth.dances.count

   def assert_destination
     assert_response :success
     assert_template 'admin_events'

My RoR journey  -- thoughts on learning RoR and lessons learned in applying TDD and agile practices.