Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View areadme.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14
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.
View areadme.txt
1 2 3 4 5 6 7 8 9 10 11 12 13
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
Something went wrong with that request. Please try again.