Sha256: bad51a54e8ea1a8cbd98bc4f5b75bdf282992982d69c7804d00f71eea0065543
Contents?: true
Size: 508 Bytes
Versions: 3
Compression:
Stored size: 508 Bytes
Contents
require "reform" require "reform/form/lotus" require "minitest/autorun" Reform::Contract.class_eval do include Reform::Contract::Validate include Reform::Form::Lotus end class LotusTest < Minitest::Spec Album = Struct.new(:title, :songs, :artist) class AlbumForm < Reform::Form property :title validates :title, presence: true end it do form = AlbumForm.new(Album.new("Show Completo")) form.validate(title: "").must_equal false form.errors.to_s.must_equal "" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
reform-2.0.1 | test/lotus/lotus_test.rb |
reform-2.0.0 | test/lotus/lotus_test.rb |
reform-2.0.0.rc3 | test/lotus/lotus_test.rb |