text_align testing

This commit is contained in:
Gant
2015-03-12 22:35:38 -05:00
parent d169ab1794
commit 5ebfafeaf9

View File

@@ -21,6 +21,11 @@ class StyleSheetForUIViewStylerTests < RubyMotionQuery::Stylesheet
st.text_alignment = :centered
end
def ui_label_text_align(st)
ui_label_kitchen_sink(st)
st.text_align = :left
end
def ui_label_attributed_string(st)
st.attributed_text = NSAttributedString.alloc.initWithString("RMQ")
end
@@ -64,6 +69,14 @@ describe 'stylers/ui_label' do
end
end
it 'should use text_align as an alias for ui_label_text_align' do
view = @vc.rmq.append(@view_klass, :ui_label_text_align).get
view.tap do |v|
v.textAlignment.should == NSTextAlignmentLeft
end
end
it "applies an attributed string" do
view = @vc.rmq.append(@view_klass, :ui_label_attributed_string).get