Sha256: a09c9be2189c120c755d4881848e75629b3ee033e3fd9c3dfded9a798b41ac76
Contents?: true
Size: 498 Bytes
Versions: 8
Compression:
Stored size: 498 Bytes
Contents
require "test_helper" class ParsePipelineTest < MiniTest::Spec Album = Struct.new(:name) class AlbumForm < Reform::Form property :name, deserializer: { parse_pipeline: ->(input, options) { Representable::Pipeline[->(input, options) { options[:represented].name = input.inspect }] } } end it "allows passing :parse_pipeline directly" do form = AlbumForm.new(Album.new) form.validate("name" => "Greatest Hits") form.name.must_equal "{\"name\"=>\"Greatest Hits\"}" end end
Version data entries
8 entries across 8 versions & 1 rubygems