Sha256: 8abdbb663881499394f81764882ecd29803f0e931d7e95cc58b3d1570ba0ce77

Contents?: true

Size: 523 Bytes

Versions: 42

Compression:

Stored size: 523 Bytes

Contents

describe "layout parent methods" do
  before do
    @subject = TestParentLayout.new.view.subviews.first
  end

  it "should be a UIView" do
    @subject.should.be.kind_of UIView
  end

  it "should set the first subview frame properly" do
    @subject.frame.should == CGRectMake(0, 0, 100, 60)
  end

  it "should use parent to set its frame properly" do
    @subject.subviews.first.frame.should == CGRectMake(10, 10, 50, 30)
    @subject.subviews.first.subviews.first.frame.should == CGRectMake(25, 15, 40, 20)
  end

end

Version data entries

42 entries across 36 versions & 1 rubygems

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