From 5ebfafeaf97b2a8ad373ce7fc70bded2ca6161f3 Mon Sep 17 00:00:00 2001 From: Gant Date: Thu, 12 Mar 2015 22:35:38 -0500 Subject: [PATCH] text_align testing --- spec/stylers/ui_label_styler.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spec/stylers/ui_label_styler.rb b/spec/stylers/ui_label_styler.rb index 41d3edf..8b1e291 100644 --- a/spec/stylers/ui_label_styler.rb +++ b/spec/stylers/ui_label_styler.rb @@ -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