Created
November 30, 2009 17:01
-
-
Save harvesthq/245558 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test::Unit::TestCase | |
def run_with_some_added_features(*args, &block) | |
# added feature code | |
run_without_some_added_features(*args, &block) | |
end | |
unless defined?(TestHelperWasLoadedOnceAlready) | |
alias_method_chain :run, :some_added_features | |
end | |
end | |
class TestHelperWasLoadedOnceAlready | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment