Hey all,
Following up on the problem with textmate after removing the at_exit
hook (see
http://groups.google.com/group/rspec/browse_thread/thread/37bbe78aa52682b0):
The problem is that the file(s) do(es) not get loaded by the rspec
runner. They appear to be required by TextMate prior to invoking the
rspec runner, so when they are required, Ruby does not reload them. I
tried overriding the require_files_to_run method from within
spec/mate/runner.rb:
::RSpec::Core::Configuration.class_eval do
def require_files_to_run do
files_to_run.each {|f| load f}
end
end
That didn’t work, but if I changed “files_to_run.each {|f| load f}” to
“load ENV[‘TM_FILEPATH’]”, it worked just fine for the cases in which we
only care about one file:
::RSpec::Core::Configuration.class_eval do
def require_files_to_run do
load ENV['TM_FILEPATH']
end
end
This is not a solution, but just something I encountered while trying to
understand the problem.
I then verified that require_files_to_run.first == ENV[‘TM_FILEPATH’],
and now I am absolutely mystified.
If anyone is interested in helping solve this, grab the
http://github.com/rspec/rspec-core/tree/no-at-exit branch of rspec-core
and master from GitHub - rspec/rspec.tmbundle: Textmate bundle for RSpec..
TIA for any help.
Cheers,
David