Sha256: fa42d9ed8f4398e6f28a5d97bc78d3588f6a05825b5ea9e3277c451de283143f

Contents?: true

Size: 971 Bytes

Versions: 24

Compression:

Stored size: 971 Bytes

Contents

describe "Layouts automatically apply styles" do

  before do
    @subject = TestApplyStyles.new.build
  end

  describe "should call all style methods" do
    {
      logo:     -> { @subject.did_call_logo },
      h1_label: -> { @subject.did_call_h1_label },
      label:    -> { @subject.did_call_label },
    }.each do |name, condition|
      it "should call #{name} style method" do
        condition.call.should == true
      end
    end
  end

  describe "should apply all styles" do
    it 'should style :logo' do
      @subject.get(:logo).text.should == 'MK'
    end
    it 'should style :label' do
      @subject.get(:label).text.should == ':label'
    end
    it 'should style :label' do
      @subject.get(:label).numberOfLines.should == 2
    end
    it 'should style :label' do
      @subject.get(:label).font.pointSize.should == 16
    end
    it 'should style :label' do
      @subject.get(:label).textColor.should == UIColor.blackColor
    end
  end

end

Version data entries

24 entries across 18 versions & 1 rubygems

Version Path
motion-kit-1.1.1 spec/tvos/apply_styles_spec.rb
motion-kit-1.1.1 spec/ios/apply_styles_spec.rb
motion-kit-1.1.0 spec/tvos/apply_styles_spec.rb
motion-kit-1.1.0 spec/ios/apply_styles_spec.rb
motion-kit-1.0.3 spec/ios/apply_styles_spec.rb
motion-kit-1.0.3 spec/tvos/apply_styles_spec.rb
motion-kit-1.0.2 spec/tvos/apply_styles_spec.rb
motion-kit-1.0.2 spec/ios/apply_styles_spec.rb
motion-kit-1.0.1 spec/tvos/apply_styles_spec.rb
motion-kit-1.0.1 spec/ios/apply_styles_spec.rb
motion-kit-1.0.0 spec/ios/apply_styles_spec.rb
motion-kit-1.0.0 spec/tvos/apply_styles_spec.rb
motion-kit-0.18.0 spec/ios/apply_styles_spec.rb
motion-kit-0.17.0 spec/ios/apply_styles_spec.rb
motion-kit-0.16.0 spec/ios/apply_styles_spec.rb
motion-kit-0.15.0 spec/ios/apply_styles_spec.rb
motion-kit-0.14.2 spec/ios/apply_styles_spec.rb
motion-kit-0.14.1 spec/ios/apply_styles_spec.rb
motion-kit-0.14.0 spec/ios/apply_styles_spec.rb
motion-kit-0.13.0 spec/ios/apply_styles_spec.rb