rails/activesupport/test/configuration_file_test.rb

19 lines
417 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require_relative "abstract_unit"
class ConfigurationFileTest < ActiveSupport::TestCase
test "backtrace contains yaml path" do
Tempfile.create do |file|
file.write("wrong: <%= foo %>")
file.rewind
error = assert_raises do
ActiveSupport::ConfigurationFile.parse(file.path)
end
assert_match file.path, error.backtrace.first
end
end
end