add spec for Cache validating JSON contents

This commit is contained in:
Josh Holtrop 2018-11-30 23:11:52 -05:00
parent 2d44a88fb6
commit 6180410cc4

View File

@ -79,5 +79,12 @@ module Rscons
expect(build_from({}).send(:calculate_checksum, "fname")).to eq "the_checksum" expect(build_from({}).send(:calculate_checksum, "fname")).to eq "the_checksum"
end end
end end
describe "#validate_json_object" do
it "raises an error when an unexpected object is passed" do
cache = build_from({})
expect {cache.__send__(:validate_json_object, :symbol)}.to raise_error /Unexpected cache value/
end
end
end end
end end