TextMate's command-R throwing errors

I’ve been happily using TextMate’s command-R and command-shift-R to
run unit and functional tests forever. Suddenly today, I’m getting
this error:

NoMethodError: undefined method `use_transactional_fixtures=’ for
Test::Unit::TestCase:Class
at top level in test_helper.rb at line 18

If I comment that line out, I just get the same undefined method error
for instantiated_fixtures.

If I run the tests on the command line, all is well. I’m at a loss as
to what might be going on here.

Any insight appreciated!

Thanks,

Jamie O-H

Have you installed any other textmate bundle or programs between the
time it was working and when
it started giving error messages?

There might be a conflict…

Jamie Orchard-Hays wrote:

I’ve been happily using TextMate’s command-R and command-shift-R to
run unit and functional tests forever. Suddenly today, I’m getting
this error:

NoMethodError: undefined method `use_transactional_fixtures=’ for
Test::Unit::TestCase:Class
at top level in test_helper.rb at line 18

If I comment that line out, I just get the same undefined method error
for instantiated_fixtures.

If I run the tests on the command line, all is well. I’m at a loss as
to what might be going on here.

Any insight appreciated!

Thanks,

Jamie O-H

I’ve had the same problem after updating Textmate, so I went back to my
laptop, which had the not updated version and copied the script that
allows you to run unit tests from within Textmate and it all worked
well. Just paste the script below under Bundles, Bundle Editor, Edit
Command, Ruby, Run focused unit test

method=$(${TM_RUBY:=ruby} <<“EOF”
n = ENV[‘TM_LINE_NUMBER’].to_i

File.open(ENV[‘TM_FILEPATH’]) do |f|
f.read.split(“\n”)[0…n].reverse.each do |line|
if line =~ /^\sdef ([_a-z][_a-z0-9][?!]?)/i
print $1
break
end
end
end
EOF)

${TM_RUBY:=ruby} “$TM_FILEPATH” --name=$method|pre

Hope it helps.


Thiago J.
acts_as_solr => http://acts-as-solr.rubyforge.org
Query string action caching => http://caching-plugin.rubyforge.org

Well, in the end I believe it was a problem with a require command in
my mocks/test/application.rb file. I had stubbed a method for the
original that called a web service and run the all my tests from
command line to test. I probably never ran any tests from textmate
until today, a week later and the error I got didn’t make sense to me.
Once I upgraded to ruby 1.8.5, I got better error reported which
pointed to the required file not being present. That let me find the
error. So all is well.

On another note, anyone know why RubyForge is down??

Jamie