spec/nsstring_spec.rb in sugarcube-1.5.9 vs spec/nsstring_spec.rb in sugarcube-1.6.0
- old
+ new
@@ -32,33 +32,9 @@
UIFont.should === font
font.familyName.should == 'Helvetica'
font.pointSize.should == UIFont.systemFontSize
end
- describe "should have a #uicolor method" do
- it "that supports hex" do
- color = '#ffffff'.uicolor
- UIColor.should === color
- color.red.should == 1.0
- color.green.should == 1.0
- color.blue.should == 1.0
-
- color = '#808080'.uicolor
- UIColor.should === color
- ((color.red * 2).round / 2.0).should == 0.5
- ((color.green * 2).round / 2.0).should == 0.5
- ((color.blue * 2).round / 2.0).should == 0.5
- end
-
- it "that supports image names" do
- 'little_square'.uicolor.should == 'little_square'.uiimage.uicolor
- end
-
- it "that supports non-existant image names" do
- 'this is not my beautiful house!'.uicolor.should == nil
- end
- end
-
it "should have a #uilabel method" do
str = 'test'
str_size = str.sizeWithFont(UIFont.systemFontOfSize(UIFont.labelFontSize))
label = str.uilabel
label.size.width.should == str_size.width