Sha256: ce31a89beca665ef0d30f60e1c863fb70d310209c1365b981abaa33dce2ac894
Contents?: true
Size: 504 Bytes
Versions: 4
Compression:
Stored size: 504 Bytes
Contents
require "test_helper" class DefaultTest < Minitest::Spec Song = Struct.new(:title, :album, :composer) Album = Struct.new(:name, :songs, :artist) Artist = Struct.new(:name) class AlbumForm < TestForm property :name, default: "Wrong" collection :songs do property :title, default: "It's Catching Up" end end it do form = AlbumForm.new(Album.new(nil, [Song.new])) assert_equal form.name, "Wrong" assert_equal form.songs[0].title, "It's Catching Up" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
reform-2.6.2 | test/default_test.rb |
reform-2.6.1 | test/default_test.rb |
reform-2.6.0 | test/default_test.rb |
reform-2.5.0 | test/default_test.rb |