add spec for Cache validating JSON contents

This commit is contained in:
josh committed 2018-11-30 23:11:52 -05:00
1 parent 2d44a88fb6
commit 6180410cc4
1 file changed
+7
+7
View File
@@ -79,5 +79,12 @@ module Rscons
expect(build_from({}).send(:calculate_checksum, "fname")).to eq "the_checksum"
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