lib/cucumber/formatter/debug.rb in cucumber-2.0.0.beta.3 vs lib/cucumber/formatter/debug.rb in cucumber-2.0.0.beta.4
- old
+ new
@@ -4,11 +4,10 @@
module Cucumber
module Formatter
class Debug
def initialize(runtime, io, options)
@io = io
- @indent = 0
end
def log(message)
return unless ENV['DEBUG']
@io.puts "* #{message}"
@@ -17,26 +16,20 @@
def respond_to?(*args)
true
end
def method_missing(name, *args)
- @indent -= 2 if name.to_s =~ /^after/
print(name)
- @indent += 2 if name.to_s =~ /^before/
end
def puts(*args)
print("puts")
end
private
def print(text)
- @io.puts "#{indent}#{text}"
- end
-
- def indent
- (' ' * @indent)
+ @io.puts text
end
end
end
end