Commits

soycamo committed 9ae2298

Kamishibai::parse_attributes! returns the object it was passed with its raw_attributes parsed, cleaned, and saved to attributes.

Comments (0)

Files changed (2)

       end
 
     end
+    # welp I forgot to "clear the cache" so to speak
     @slideset << current_slide
     
     # dang I wanna use @slideset.collect!(&:parse_attributes) 'cause I <3 that syntax
     attrs = attrs.gsub('@', '||@').split('||')
     attrs.delete_if{|attr| attr.empty? }
     slide.attributes = attrs
+    slide
   end
 end
 
   end
 
   it "should merge attributes that included newlines" do
-    pending
     slide = @ksb.slideset.first
     clean_attributes = 
       ["@image = Conclusion.bmp",
        "@option4 = <---",
        "@link4 = A17"]
 
-    Kamishibai.parse_attributes!(slide).should == clean_attributes
+    Kamishibai.parse_attributes!(slide)
+    slide.attributes.should == clean_attributes
   end
 
   it "should return the correct number of attributes" do