Sha256: 039a4fa1ed6e4ac2c604f758f6858a766b04c5dee81796435a6eafd675ebd0f0

Contents?: true

Size: 923 Bytes

Versions: 21

Compression:

Stored size: 923 Bytes

Contents

describe TestLayerHelpers do
  before do
    @subject = TestLayerHelpers.new
  end

  it 'should create a CALayer root' do
    @subject.view.should.be.kind_of(CALayer)
  end

  it 'should add sublayers' do
    @subject.view.sublayers.length.should == 3
  end

  describe 'should have styled sublayers' do
    before do
      @subject = TestLayerHelpers.new
    end

    it 'should have a CALayer' do
      @subject.view.sublayers[0].opacity.should == 0.5
      @subject.view.sublayers[0].backgroundColor.should.not == nil
    end

    it 'should have a CAGradientLayer' do
      @subject.view.sublayers[1].opacity.should == 0.5
      @subject.view.sublayers[1].colors.should.not == nil
      @subject.view.sublayers[1].colors.length.should == 2
    end

    it 'should have a CAShapeLayer' do
      @subject.view.sublayers[2].opacity.should == 0.5
      @subject.view.sublayers[2].path.should.not == nil
    end
  end

end

Version data entries

21 entries across 15 versions & 1 rubygems

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