Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Do you have a problem making use of a Rails' default migration generation
logic's inclusion of your test_helper?
require 'test_helper'
Do you have to replace it with?
require File.dirname(__FILE__) + '/../test_helper'
Manually? Every time? Annoyed?
Your problem might be using aliases in your test_helper. It seems test_helper
is loaded twice, and these aliases get into a circular loop. See a workaround
class Test::Unit::TestCase
def run_with_some_added_features(*args, &block)
# added feature code
run_without_some_added_features(*args, &block)
unless defined?(TestHelperWasLoadedOnceAlready)
alias_method_chain :run, :some_added_features
class TestHelperWasLoadedOnceAlready
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment