OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / spec / factories.rb
index e5967d7..b4929dd 100644 (file)
@@ -61,10 +61,12 @@ FactoryGirl.define do
     license.system_picture_id 1
   end
 
-  factory :color, :class => Color do |color|
-    color.name 'black'
-    color.code 0
-    color.t 0
+  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 :comic, :class => Comic do |comic|
@@ -130,6 +132,7 @@ FactoryGirl.define do
     sbt.classname 'Plain'
     sbt.caption 'normal fuki'
     sbt.t 0
+    sbt.system_picture_id 1 
     sbt.settings '{}'
   end
 
@@ -140,6 +143,7 @@ FactoryGirl.define do
     sb.z 1
     sb.t 0
     sb.settings '{}'
+    sb.caption 'test pict'
   end
 
   factory :balloon, :class => Balloon do |balloon|
@@ -149,12 +153,12 @@ FactoryGirl.define do
     balloon.y 200
     balloon.width 222 
     balloon.height 333 
-    balloon.caption 'test pict'
     balloon.settings nil
   end
 
   factory :speech, :class => Speech do |speech|
     speech.speech_balloon_id 1
+    speech.writing_format_id 1
     speech.content 'test'
     speech.x 10
     speech.y 100
@@ -175,15 +179,9 @@ FactoryGirl.define do
     pp.height 300
   end
 
-  factory :panel_color, :class => PanelColor do |pc|
-    pc.panel_id 1
-    pc.z 1
-    pc.code 1
-  end
-
   factory :ground_color, :class => GroundColor do |gc|
     gc.panel_id 1
-    gc.color_id 1
+    gc.code 1
     gc.z 1
   end