Setting up autotest with rspec in ubuntu

Posted by Reactor5 on Super User See other posts from Super User or by Reactor5
Published on 2010-08-09T14:39:29Z Indexed on 2011/01/31 7:28 UTC
Read the original article Hit count: 346

Filed under:
|

I'm trying to set up autotest on Ubuntu, and no matter what my configuration, I get this:

loading autotest/rails_rspec2
style: RailsRspec2
/home/brian/.rvm/gems/ruby-1.9.2-rc2@rails3tutorial/gems/redgreen-1.2.2/lib/redgreen/autotest.rb:6:in `<top (required)>': uninitialized constant Object::PLATFORM (NameError)

the .autotest (~/.autotest) file I have is as follows:

#!/usr/bin/env ruby
require 'redgreen/autotest'
def self.notify title, msg, img, pri='low', time=3000
`notify-send -i #{img} -u #{pri} -t #{time} '#{msg}'`
end
Autotest.add_hook :ran_command do |at|
results = [at.results].flatten.join("\n")
output = results.slice(/(\d+)\s+examples?,\s*(\d+)\s+failures?(,\s*(\d+)\s+not implemented)?(,\s*(\d+)\s+pending)?/)
folder = "~/Pictures/autotest/"
if output =~ /([123456789]|[\d]{2,})\sfailures?/
notify "FAIL:", "#{output}", folder+"rails_fail.png", 'critical', 10000
elsif output =~ /[1-9]\d*\spending?/
notify "PENDING:", "#{output}", folder+"rails_pending.png", 'normal', 10000
else
notify "PASS:", "#{output}", folder+"rails_ok.png"
end
end

what am I doing wrong here?

© Super User or respective owner

Related posts about ubuntu

Related posts about ruby-on-rails