class AvocadoFormatter::Cucumber
Constants
- CHARS
Public Class Methods
new(runtime, path_or_io, options)
click to toggle source
# File lib/avocado_formatter/cucumber.rb, line 10 def initialize(runtime, path_or_io, options) @runtime, @io, @options = runtime, ensure_io(path_or_io), options @hostname = 'localhost' @port = '1336' @socket = TCPSocket.open(@hostname, @port) @socket.puts(@runtime.scenarios.length); @socket.puts(@runtime.steps.length); end
Public Instance Methods
after_feature(feature)
click to toggle source
# File lib/avocado_formatter/cucumber.rb, line 27 def after_feature(feature) # print_elapsed_time @io, @start_time # @io.puts # # @exceptions.each do |(exception, status)| # print_exception(exception, status, 2) # end end
after_features(features)
click to toggle source
# File lib/avocado_formatter/cucumber.rb, line 41 def after_features(features) # @io.puts # print_stats(features, @options) # print_snippets(@options) # print_passing_wip(@options) end
before_feature(feature)
click to toggle source
# File lib/avocado_formatter/cucumber.rb, line 19 def before_feature(feature) # @io.print "#{label(feature)} " # @io.flush # @exceptions = [] # @start_time = Time.now @socket.puts(label(feature)); end
done()
click to toggle source
# File lib/avocado_formatter/cucumber.rb, line 63 def done end
exception(exception, status)
click to toggle source
Calls superclass method
# File lib/avocado_formatter/cucumber.rb, line 36 def exception(exception, status) @exceptions << [exception, status] super if defined?(super) end
label(feature)
click to toggle source
# File lib/avocado_formatter/cucumber.rb, line 6 def label(feature) feature.short_name end
progress(status)
click to toggle source
# File lib/avocado_formatter/cucumber.rb, line 56 def progress(status) char = CHARS[status] @socket.puts(char); # @io.print(format_string(char, status)) # @io.flush end