1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
require 'yaml'
require 'cucumber/encoding'
require 'cucumber/platform'
require 'cucumber/runtime'
require 'cucumber/cli/main'
require 'cucumber/step_definitions'
require 'cucumber/term/ansicolor'
module Cucumber
class << self
attr_accessor :wants_to_quit
def logger
return @log if @log
@log = Logger.new(STDOUT)
@log.level = Logger::INFO
@log
end
def logger=(logger)
@log = logger
end
if Cucumber::RUBY_1_9
# Backported from Ruby 2.0 to 1.9
def Hash(other)
return {} if other.nil? || other == []
raise TypeError, "can't convert #{other.class} into Hash" unless other.respond_to?(:to_hash)
other.to_hash
end
else
def Hash(other)
Kernel::Hash(other)
end
end
end
end
|