Panasonic Youth rob sanheim writes about software, business, ruby, music, stuff and things



Posted
6 September 2007 @ 8am

Tagged
Rails, Ruby, TDD

Discuss

Overriding setup in Rail’s test_helper - impossible?

Is there a way that will just work for adding common setup code to test_helper? None of the below work:

# this breaks fixtures in the acts_as_authenticated account_controller_test (but nowhere else, for some reason)...
  def setup
  end

# this breaks things all over the place
  def setup
     super
  end

# this is the way I think it _should_ work, but it breaks down in functional tests
  def setup_with_logging
    setup_without_logging
  end
  alias_method_chain :setup, :logging

There is way too much magic happening in the rails test setup, particularly in fixtures.rb. This should not be that difficult.


No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment

iPhone price whining Less Magic, Please