X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=blobdiff_plain;f=spec%2Ffactories.rb;h=1a66ab114ab06817f134c8ca0e256a5d357d4891;hp=99843c10a2a9bf4e8fee2d576dce2bcda1d55e85;hb=279324e2ea829a8e13358a850335cbd765e98fe5;hpb=d856140c7a360a36d606e7b361ca044a88629985 diff --git a/spec/factories.rb b/spec/factories.rb index 99843c10..1a66ab11 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -61,10 +61,66 @@ FactoryGirl.define do license.system_picture_id 1 end + factory :writing_format, :class => WritingFormat do |writing_format| + writing_format.name 'simple_format@pettan.com' + writing_format.classname 'SimpleFormat' + writing_format.caption 'sl' + writing_format.system_picture_id 1 + writing_format.settings '{}' + end + + factory :scroll, :class => Scroll do |scroll| + scroll.title "scroll" + scroll.description 'scroll description' + scroll.visible 1 + scroll.author_id 1 + end + + factory :scroll_panel, :class => ScrollPanel do |scroll_panel| + scroll_panel.scroll_id 1 + scroll_panel.panel_id 1 + scroll_panel.author_id 1 + scroll_panel.t 0 + end + factory :comic, :class => Comic do |comic| comic.title "comic" comic.description 'comic description' comic.visible 1 + comic.author_id 1 + end + + factory :story, :class => Story do |story| + story.comic_id 1 + story.title "scroll" + story.description 'scroll description' + story.visible 1 + story.t 0 + end + + factory :story_sheet, :class => StorySheet do |story_sheet| + story_sheet.sheet_id 1 + story_sheet.story_id 1 + story_sheet.t 0 + story_sheet.author_id 1 + end + + factory :sheet, :class => Sheet do |sheet| + sheet.caption "sheet" + sheet.width 222 + sheet.height 111 + sheet.visible 1 + sheet.author_id 1 + end + + factory :sheet_panel, :class => SheetPanel do |sheet_panel| + sheet_panel.sheet_id 1 + sheet_panel.panel_id 1 + sheet_panel.x 111 + sheet_panel.y 200 + sheet_panel.z 1 + sheet_panel.t 0 + sheet_panel.author_id 1 end factory :original_picture, :class => OriginalPicture do |op| @@ -152,6 +208,9 @@ FactoryGirl.define do speech.speech_balloon_id 1 speech.writing_format_id 1 speech.content 'test' + speech.font_size 1.0 + speech.text_align 1 + speech.fore_color 0xffffff speech.x 10 speech.y 100 speech.width 200 @@ -174,6 +233,7 @@ FactoryGirl.define do factory :ground_color, :class => GroundColor do |gc| gc.panel_id 1 gc.code 1 + gc.orientation 0 gc.z 1 end @@ -192,16 +252,6 @@ FactoryGirl.define do panel.author_id 1 end - factory :story, :class => Story do |story| - story.comic_id 1 - story.panel_id 1 - story.author_id 1 - story.t 0 - story.x nil - story.y nil - story.z nil - end - factory :provider, :class => Provider do |provider| provider.name 'admin@penguinkingdom.com' provider.caption 'ペンギン王国'