spec/object_spec.rb in strong_json-2.1.0 vs spec/object_spec.rb in strong_json-2.1.1

- old
+ new

@@ -6,11 +6,11 @@ type = StrongJSON::Type::Object.new( { a: StrongJSON::Type::Base.new(:numeric), b: StrongJSON::Type::Base.new(:string) }, - on_unknown: :raise, + on_unknown: :reject, exceptions: Set.new ) expect(type.coerce(a: 123, b: "test")).to eq(a: 123, b: "test") end @@ -83,11 +83,11 @@ let(:type) { StrongJSON::Type::Object.new( { a: StrongJSON::Type::Optional.new(StrongJSON::Type::Base.new(:numeric)) }, - on_unknown: :raise, + on_unknown: :reject, exceptions: Set[] ) } it "accepts missing field if optional" do @@ -108,11 +108,11 @@ StrongJSON::Type::Object.new( { a: StrongJSON::Type::Base.new(:numeric), b: StrongJSON::Type::Base.new(:string) }, - on_unknown: :raise, + on_unknown: :reject, exceptions: Set[] ) } it "returns true for valid object" do @@ -126,11 +126,11 @@ describe "#ignore" do let (:type) { StrongJSON::Type::Object.new( { a: StrongJSON::Type::Base.new(:numeric) }, - on_unknown: :raise, + on_unknown: :reject, exceptions: Set[] ) } context "if no argument is given" do @@ -161,10 +161,10 @@ describe "#reject" do let (:type) { StrongJSON::Type::Object.new( { a: StrongJSON::Type::Base.new(:numeric) }, - on_unknown: :raise, + on_unknown: :reject, exceptions: Set[] ) } context "if no argument is given" do