spec/array_spec.rb in strong_json-0.9.0 vs spec/array_spec.rb in strong_json-1.0.0

- old
+ new

@@ -19,22 +19,22 @@ end it "reject non array" do type = StrongJSON::Type::Array.new(StrongJSON::Type::Base.new(:number)) - expect { type.coerce({}) }.to raise_error(StrongJSON::Type::Error) + expect { type.coerce({}) }.to raise_error(StrongJSON::Type::TypeError) end it "reject membership" do type = StrongJSON::Type::Array.new(StrongJSON::Type::Base.new(:number)) - expect { type.coerce(["a"]) }.to raise_error(StrongJSON::Type::Error) + expect { type.coerce(["a"]) }.to raise_error(StrongJSON::Type::TypeError) end it "rejects nil" do type = StrongJSON::Type::Array.new(StrongJSON::Type::Base.new(:number)) - expect { type.coerce(nil) }.to raise_error(StrongJSON::Type::Error) + expect { type.coerce(nil) }.to raise_error(StrongJSON::Type::TypeError) end describe "=~" do it "returns true for array" do type = StrongJSON::Type::Array.new(StrongJSON::Type::Base.new(:number))