Sort of already tried, here's the commit:
http://github.com/rails/rails/commit/e8170805df1a32119db9d328daee1239b338ac71
(see the comments). Felt a bit like talking to debian core peeps about
installing gems with 'gem' instead of apt-get - They Have Decided And
Won't Listen To You.
But hey, your voice ranks higher than mine, perhaps it helps if you
whine a bit about it as well? ; )
On Jun 15, 2:09 pm, "Nic Williams" <
drnicwilli...@gmail.com> wrote:
> So as you figured out, when rails runs the tests, its already updated the
> $LOAD_PATH with RAILS_ROOT/test but when you run the test file directly
> (which should successfully run the tests) it has not yet run the
> config/environment.rb file thus no $LOAD_PATH fixes.
> This isn't a TextMate-bundle specific problem. I should be able to run the
> following from the cmd-line, imo:
>
> ruby test/units/person_test.rb
>
> and have the tests run.
>
> I think rails needs re-patching so that the line you mention below is in all
> generators. August - you want to do this for the good of man-kind?
>
> Nic
>
> On Sun, Jun 15, 2008 at 10:04 PM, August Lilleaas <
augustlille...@gmail.com>
> wrote:
>
>
>
>
>
> > Tests in 2.1 does this:
>
> > require 'test_helper'
>
> > While the pre 2.1 tests did this:
>
> > require File.dirname(__FILE__) + '/../test_helper'
>
> > As textmate isn't aware of the load path stuff Rails does, it
> > (obviously) causes it to yield "LoadError: no such file to load —
> > test_helper" when trying to run a 2.1 test with command + R.
>
> > I've heard some people say that textmate should run the tests using
> > the rake tasks or something. I don't know much about textmate bundles,
> > so I can't do much about this (I spent ~ 2 hours trying to make it
> > work, but gave up). Would be very sweet if someone could update the
> > bundle so that we can again run tests directly from t3h mate.
>
> --
> Dr Nic Williams
> * Learn TextMate for Rails2 -
http://peepcode.com/products/textmate-for-rails-2*
> Training in Ruby/Rails/JavaScript -
http://drnicacademy.com
> Fun with Ruby/Rails/Javascript -
http://drnicwilliams.com