Sha256: 2096d80cfec6ceea7b5dd0bb17e4ae9028f9cc046946f2fef45d1079cb8e042d

Contents?: true

Size: 920 Bytes

Versions: 21

Compression:

Stored size: 920 Bytes

Contents

describe TestLayerLayout do
  before do
    @subject = TestLayerLayout.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 = TestLayerLayout.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 21 versions & 1 rubygems

Version Path
motion-kit-0.11.2 spec/ios/layer_layout_spec.rb
motion-kit-0.11.1 spec/ios/layer_layout_spec.rb
motion-kit-0.11.0 spec/ios/layer_layout_spec.rb
motion-kit-0.10.11 spec/ios/layer_layout_spec.rb
motion-kit-0.10.10 spec/ios/layer_layout_spec.rb
motion-kit-0.10.9 spec/ios/layer_layout_spec.rb
motion-kit-0.10.8 spec/ios/layer_layout_spec.rb
motion-kit-0.10.7 spec/ios/layer_layout_spec.rb
motion-kit-0.10.6 spec/ios/layer_layout_spec.rb
motion-kit-0.10.5 spec/ios/layer_layout_spec.rb
motion-kit-0.10.4 spec/ios/layer_layout_spec.rb
motion-kit-0.10.3 spec/ios/layer_layout_spec.rb
motion-kit-0.10.2 spec/ios/layer_layout_spec.rb
motion-kit-0.10.1 spec/ios/layer_layout_spec.rb
motion-kit-0.10.0 spec/ios/layer_layout_spec.rb
motion-kit-0.9.6 spec/ios/layer_layout_spec.rb
motion-kit-0.9.4 spec/ios/layer_layout_spec.rb
motion-kit-0.9.3 spec/ios/layer_layout_spec.rb
motion-kit-0.9.2 spec/ios/layer_layout_spec.rb
motion-kit-0.9.1 spec/ios/layer_layout_spec.rb