spec/ios/uibutton_layout_spec.rb in motion-kit-0.9.4 vs spec/ios/uibutton_layout_spec.rb in motion-kit-0.9.6
- old
+ new
@@ -19,6 +19,19 @@
it 'should set the highlighted image' do
@layout.get(:button).imageForState(UIControlStateHighlighted).should == TestButtonLayout::HIGHLIGHTED_IMAGE
end
+ it 'should set the titleLabel font' do
+ font = @layout.get(:button).titleLabel.font
+ should_be_font = UIFont.fontWithName(TestButtonLayout::FONT, size: TestButtonLayout::SIZE)
+
+ font.familyName.should == should_be_font.familyName
+ font.pointSize.should == should_be_font.pointSize
+ end
+
+ it 'should set the titleLabel textAlignment' do
+ alignment = @layout.get(:button).titleLabel.textAlignment
+ alignment.should == NSTextAlignmentCenter
+ end
+
end