From: Usman Hussain Date: 2011-03-04T01:00:29+09:00 Subject: Re: How to stop a file from being required On Mar 3, 1:42 pm, Steve Klabnik wrote: > [Note:  parts of this message were removed to make it a legal post.] > > The only place this gets tricky is if you load a file from two different > paths. So, a test_helper.rb for example > > $ ls > test_helper.rb > some_test.rb > foo > | >  `foo_test.rb > > In some_test: > > require 'test_helper' > > in foo_test > > require '../test_helper' > > Now it'll load the test_helper twice, because those two strings are > different. The solution: > > require "File.expand_path(test_helper)" the problem is... we do not know where the file is first getting loaded... so if we can unrequire a file that would be great. is that even possible though? Many thanks for your help. they have been real helpful. Kind regards, Usman Hussain