Sha256: 38382b30ca0a253a6cb2fec655d38f9590d76ed0d1640326c8b739d500723c6a
Contents?: true
Size: 624 Bytes
Versions: 6
Compression:
Stored size: 624 Bytes
Contents
require_relative "../../../test_helper" require "tempfile" module Eye module Patch describe Settings do it "evaluates the yaml as ERB" do file = Tempfile.new("yaml") file.write("sum: <%= 1 + 2 %>") file.close assert_equal 3, Settings.new(file.path)[:sum] end it "exposes the config file's path within ERB" do file = Tempfile.new("yaml") file.write("working_dir: <%= __FILE__ %>/..") file.close assert_equal( File.join(file.path, ".."), Settings.new(file.path)[:working_dir], ) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems