Autotest / rspec not failing tests

Hi all,

Bit of a noob problem. I’m attempting to get autotest / rspec running on
my OSX 1.5 machine. Everything is the latest version.

My test looks like:

require ‘test/unit’

class TestString < Test::Unit::TestCase
def test_downcase
assert_equal(“abcd”, “ABCD”.downcase)
end
def test_upcase
assert_equal(“ABCDf”, “abcd”.upcase)
end

end
---- (should be failing!)

and it is in the test/unit directory. Autotest is running, rspec /
rspec_rails are installed as plugins, not gems. Heres my .autotest file:


require ‘autotest/redgreen’
require ‘autotest/timestamp’

module Autotest::Growl
def self.growl title, msg, img, pri=0, sticky=""
system “growlnotify -n autotest --image #{img} -p #{pri} -m
#{msg.inspect} #{title} #{sticky}”
end
Autotest.add_hook :ran_command do |at|
image_root = “~/.autotest_images”
results = [at.results].flatten.join(“n”)
output =
results.slice(/(d+)stests,s(d+)sassertions,s(d+)sfailures,s(d+)serrors/)
if output
if $~[3].to_i > 0 || $~[4].to_i > 0
cnt = [(9 + $~[3].to_i + $~[4].to_i) / 10 * 10, 50].min
growl “FAIL”, “#{output}”, “#{image_root}/fail#{cnt}.png”, 2
else
growl “Pass”, “#{output}”, “#{image_root}/pass.png”
end
end
end
end

---- (for the doomguy / growl setup)

My console output looks like:

johnp:link_fixer John$ autotest -rails
loading autotest/rails_rspec
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S
script/spec -O spec/spec.opts

Waiting since 2008-04-30 12:41:52

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S
script/spec -O spec/spec.opts

Waiting since 2008-04-30 12:42:14

^CInterrupt a second time to quit


So, every time I save a file it repeats the -O spec/spec.opts line, but
there is no explicit test output.

Does anyone see what I’m doing wrong?
Thanks,
John

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs