From c7119804e2bd2be552ddb751f5b44e1f57c111a7 Mon Sep 17 00:00:00 2001 From: Nick Sutterer Date: Mon, 17 Mar 2014 22:15:38 +1100 Subject: [PATCH] add test with nested form but empty model to address #67 and #70 --- test/nested_form_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/nested_form_test.rb b/test/nested_form_test.rb index 12c3413e..6373c2f4 100644 --- a/test/nested_form_test.rb +++ b/test/nested_form_test.rb @@ -41,10 +41,17 @@ class AlbumForm < Reform::Form form.to_hash.must_equal({"hit"=>{"title"=>"Downtown"}, "title" => "Blackhawks Over Los Angeles", "songs"=>[{"title"=>"Calling"}]}) end + it "creates nested forms" do form.hit.must_be_kind_of Reform::Form form.songs.must_be_kind_of Reform::Form::Forms end + # describe "#initialize" do + # it "allows empty properties" do + # AlbumForm.new(OpenStruct.new) + # end + # end + describe "rendering" do it { form.title.must_equal "Blackhawks Over Los Angeles" }