spec/object_spec.rb in strong_json-0.3.0 vs spec/object_spec.rb in strong_json-0.4.0
- old
+ new
@@ -28,10 +28,10 @@
end
it "rejects objects with missing fields" do
type = StrongJSON::Type::Object.new(a: StrongJSON::Type::Base.new(:numeric))
- expect{ type.coerce(b: "test") }.to raise_error(StrongJSON::Type::Error)
+ expect{ type.coerce(b: "test") }.to raise_error(StrongJSON::Type::UnexpectedFieldError)
end
end
describe "optional" do
it "accepts missing field if optional" do