[TxMt] RSpec and HtmlFormatter Error
Takaaki Kato
devlist at samuraicoder.net
Sat Apr 12 14:16:08 UTC 2008
Hi,
If I run a Command-R against RSpec file. I get an error as the
following:
/Library/Application Support/TextMate/Bundles/Ruby RSpec.tmbundle/
Support/lib/text_mate_formatter.rb:5: uninitialized constant
Spec::Runner::Formatter::HtmlFormatter (NameError) from /System/
Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
rubygems/custom_require.rb:27:in `gem_original_require' from /System/
Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/
rubygems/custom_require.rb:27:in `require' from /Library/Application
Support/TextMate/Bundles/Ruby RSpec.tmbundle/Support/lib/spec_mate.rb:
14 from /tmp/temp_textmate.bxz8HJ:3:in `require' from /tmp/
temp_textmate.bxz8HJ:3
Here is the file.
# text_mate_formatter.rb
module Spec
module Runner
module Formatter
# Formats backtraces so they're clickable by TextMate
class TextMateFormatter < HtmlFormatter
def backtrace_line(line)
line.gsub(/([^:]*\.rb):(\d*)/) do
"<a href=\"txmt://open?url=file://
#{File.expand_path($1)}&line=#{$2}\">#{$1}:#{$2}</a> "
end
end
end
end
end
end
Running tests from Terminal works. I think I'm supposed see a colorful
result in the window, right?
Any help would be appricated.
Takaaki
--
Takaaki Kato
http://samuraicoder.net
More information about the textmate
mailing list