Sha256: c992ddc4d50708da88f9d8a5cae007b9b8db019683c1b5740a3b208a49524186
Contents?: true
Size: 598 Bytes
Versions: 73
Compression:
Stored size: 598 Bytes
Contents
require "spec_helper" describe ActiveModel::Validations::NumericalityValidator do describe "#validate_each" do before(:all) do class TestModel include Mongoid::Document field :amount, type: BigDecimal validates_numericality_of :amount, allow_blank: false end end after(:all) do Object.send(:remove_const, :TestModel) end context "when the value is non numeric" do let(:model) do TestModel.new(amount: "asdf") end it "returns false" do expect(model).to_not be_valid end end end end
Version data entries
73 entries across 68 versions & 6 rubygems