Sha256: 32ec8b315a9e365d16cced08e43253252a8e7da5cf70a704c97942c5d80d265e
Contents?: true
Size: 615 Bytes
Versions: 22
Compression:
Stored size: 615 Bytes
Contents
require 'spec_helper' describe Localeapp, "#load_yaml(content)" do let(:bad_yaml) { "---\n- 1\n- 2\n- 3\n- !ruby/object:Object\n foo: 1\n" } it "raises an exception if the content contains potentially insecure yaml" do with_configuration(:raise_on_insecure_yaml => true) do expect { Localeapp.load_yaml(bad_yaml) }.to raise_error(Localeapp::PotentiallyInsecureYaml) end end it "doesn't raise if the raise_on_insecure_yaml setting is false" do with_configuration(:raise_on_insecure_yaml => false) do expect { Localeapp.load_yaml(bad_yaml) }.to_not raise_error end end end
Version data entries
22 entries across 22 versions & 1 rubygems