Sha256: f7571aa050bd97f83f161a336de2ce90679f329059401f5fbe3a163d30370ef8

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

HERE = File.dirname(__FILE__) unless defined?(HERE)
ROOT = File.join(HERE, "..") unless defined?(ROOT)

$LOAD_PATH << File.join(ROOT, "lib")
$LOAD_PATH << File.join(HERE, "support")

require "yaml"
if ENV["YAMLER"] && defined?(YAML::ENGINE)
  YAML::ENGINE.yamler = ENV["YAMLER"]
end

ruby_version = defined?(JRUBY_VERSION) ? "JRuby #{JRUBY_VERSION} in #{RUBY_VERSION} mode" : "Ruby #{RUBY_VERSION}"
yaml_engine = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck"
libyaml_version = yaml_engine == "psych" && Psych.const_defined?("LIBYAML_VERSION", false) ? Psych::LIBYAML_VERSION : "N/A"

puts <<-EOM

  Running #{ruby_version} with '#{yaml_engine}' YAML engine.
  YAML engine version: #{YAML::VERSION}
  libyaml version: #{libyaml_version}

EOM

# Caching references to these methods before loading safe_yaml in order to test
# that they aren't touched unless you actually require safe_yaml (see yaml_spec.rb).
ORIGINAL_YAML_LOAD      = YAML.method(:load)
ORIGINAL_YAML_LOAD_FILE = YAML.method(:load_file)

require "safe_yaml/load"
require "ostruct"
require "hashie"
require "heredoc_unindent"

require File.join(HERE, "resolver_specs")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
safe_yaml-1.0.2 spec/spec_helper.rb