spec/enum_spec.rb in strong_json-1.1.0 vs spec/enum_spec.rb in strong_json-2.0.0
- old
+ new
@@ -27,20 +27,20 @@
StrongJSON::Type::Object.new(
{
id: StrongJSON::Type::Literal.new("id1"),
value: StrongJSON::Type::Base.new(:string)
},
- ignored_attributes: nil,
- prohibited_attributes: Set.new
+ on_unknown: :raise,
+ exceptions: Set[]
),
StrongJSON::Type::Object.new(
{
id: StrongJSON::Type::Base.new(:string),
value: StrongJSON::Type::Base.new(:symbol)
},
- ignored_attributes: nil,
- prohibited_attributes: Set.new
+ on_unknown: :raise,
+ exceptions: Set[]
),
StrongJSON::Type::Optional.new(StrongJSON::Type::Literal.new(3)),
StrongJSON::Type::Literal.new(false),
]
)
@@ -71,21 +71,21 @@
StrongJSON::Type::Object.new(
{
regexp: StrongJSON::Type::Base.new(:string),
option: StrongJSON::Type::Base.new(:string),
},
- ignored_attributes: nil,
- prohibited_attributes: Set.new
+ on_unknown: :raise,
+ exceptions: Set[]
)
}
let(:literal_pattern) {
StrongJSON::Type::Object.new(
{
literal: StrongJSON::Type::Base.new(:string)
},
- ignored_attributes: nil,
- prohibited_attributes: Set.new
+ on_unknown: :raise,
+ exceptions: Set[]
)
}
let(:type) {
StrongJSON::Type::Enum.new(