Sha256: f8a11f688ef653b963c21e317a7d195f6b9cae85ef5f607f10607bb909d92279

Contents?: true

Size: 988 Bytes

Versions: 22

Compression:

Stored size: 988 Bytes

Contents

describe 'Relative Layouts' do
  before do
    @subject = TestRelativeLayout.new.build
  end

  it "should have two subviews" do
    @subject.view.subviews.count.should == 2
  end

  describe "should have a test view" do
    it "with origin x = y = 0" do
      @subject.get(:test).frame.origin.x.should == 0
      @subject.get(:test).frame.origin.y.should == 0
    end
    it "with frame w = h = 100" do
      @subject.get(:test).frame.size.width.should == UIScreen.mainScreen.bounds.size.width
      @subject.get(:test).frame.size.height.should == 100
    end
  end

  describe "should have a test2 view below test view" do
    it "with origin x = 0, y = 100" do
      @subject.get(:test2).frame.origin.x.should == 0
      @subject.get(:test2).frame.origin.y.should == 100
    end
    it "with frame w = 100, h = 50" do
      @subject.get(:test2).frame.size.width.should == UIScreen.mainScreen.bounds.size.width
      @subject.get(:test2).frame.size.height.should == 50
    end
  end
end

Version data entries

22 entries across 16 versions & 1 rubygems

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