lib/ramaze/spec/helper/pretty_output.rb in ramaze-0.3.5 vs lib/ramaze/spec/helper/pretty_output.rb in ramaze-0.3.9
- old
+ new
@@ -12,16 +12,16 @@
def handle_requirement(description)
print "- #{description}\n"
error = yield
unless error.empty?
- if defined?(Ramaze::Informing)
+ if defined?(Ramaze::Logging)
puts '', " #{NAME} -- #{description} [FAILED]".center(70, '-'), ''
colors = Ramaze::Informer::COLORS
- until RamazeLogger.log.empty?
- tag, line = RamazeLogger.log.shift
+ until RamazeLogger.history.empty?
+ tag, line = RamazeLogger.history.shift
out = "%6s | %s" % [tag.to_s, line]
puts out.send(colors[tag])
end
end
@@ -43,32 +43,32 @@
Counter.values_at(:specifications, :requirements, :failed, :errors)
end
end
end
-if defined?(Ramaze::Informing)
+if defined?(Ramaze::Logging)
module Ramaze
class SpecLogger
- include Ramaze::Informing
+ include Ramaze::Logging
include Enumerable
- attr_accessor :log
+ attr_accessor :history
def initialize
- @log = []
+ @history = []
end
def each
- @log.each{|e| yield(e) }
+ @history.each{|e| yield(e) }
end
- def inform(tag, str)
- @log << [tag, str]
+ def log(tag, str)
+ @history << [tag, str]
end
end
end
module Bacon::PrettyOutput
RamazeLogger = Ramaze::SpecLogger.new
- Ramaze::Inform.loggers = [RamazeLogger]
+ Ramaze::Log.loggers = [RamazeLogger]
end
end