+ FactoryGirl.attributes_for(:speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @sbt.id, :t => 4, :z => 3+1)\r
+ )\r
+ sb2.balloons.build(\r
+ FactoryGirl.attributes_for(:balloon, :speech_balloon_id => sb2.id)\r
+ )\r
+ sb2.speeches.build(\r
+ FactoryGirl.attributes_for(:speech, :speech_balloon_id => sb2.id)\r
+ )\r
+ @gc = @panel.ground_colors.build(\r
+ FactoryGirl.attributes_for(:ground_color, :panel_id => @panel.id, :t => 4, :z => 4+1)\r
+ )\r
+ @gp = @panel.ground_pictures.build(\r
+ FactoryGirl.attributes_for(:ground_picture, :panel_id => @panel.id, :picture_id => @p.id, :t => 5, :z => 5+1)\r
+ )\r
+ r = @panel.validate_child\r
+ r.should be_false\r
+ end\r
+ end\r
+ context 'zシリアライズされていないとき' do\r
+ it 'falseを返している' do\r
+ @panel = FactoryGirl.build :panel, :author_id => @author.id\r
+ @panel.panel_pictures.build(\r
+ FactoryGirl.attributes_for(:panel_picture, :panel_id => @panel.id, :picture_id => @p.id, :t => 0, :z => 0+1)\r
+ )\r
+ @panel.panel_pictures.build(\r
+ FactoryGirl.attributes_for(:panel_picture, :panel_id => @panel.id, :picture_id => @p.id, :t => 1, :z => 0+1)\r
+ )\r
+ sb1 = @panel.speech_balloons.build(\r
+ FactoryGirl.attributes_for(:speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @sbt.id, :t => 2, :z => 2+1)\r
+ )\r
+ sb1.balloons.build(\r
+ FactoryGirl.attributes_for(:balloon, :speech_balloon_id => sb1.id)\r
+ )\r
+ sb1.speeches.build(\r
+ FactoryGirl.attributes_for(:speech, :speech_balloon_id => sb1.id)\r
+ )\r
+ sb2 = @panel.speech_balloons.build(\r
+ FactoryGirl.attributes_for(:speech_balloon, :panel_id => @panel.id, :speech_balloon_template_id => @sbt.id, :t => 3, :z => 3+1)\r