mirror of
https://github.com/zhigang1992/rmq.git
synced 2026-01-12 17:52:17 +08:00
text_align testing
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user