Sha256: 5ae579616d0266435908244a56360c749594d4658ab002f5f66c937968d1ab66

Contents?: true

Size: 1005 Bytes

Versions: 24

Compression:

Stored size: 1005 Bytes

Contents

describe 'Create Layout' do
  before do
    @subject = TestCreateLayout.new
  end

  it 'should create a view' do
    @subject.create_view.should.not == nil
  end

  it 'should create a UIView' do
    @subject.create_view.should.be.kind_of(UIView)
  end

  it 'should create a new view every time' do
    create_view1 = @subject.create_view
    create_view2 = @subject.create_view
    create_view1.should.not == create_view2
  end

  it 'should create a view without a superview' do
    @subject.create_view.superview.should == nil
  end

  it 'should add a label to the view' do
    @subject.create_view.subviews.first.should.be.kind_of(UILabel)
  end

  it 'should not add an image view' do
    @subject.create_view.subviews.find { |view| view.is_a?(UIImageView) }.should == nil
  end

  it 'should allow a view to be returned ' do
    @subject.create_and_context.should.not == nil
  end

  it 'should create a UIView via context' do
    @subject.create_and_context.should.be.kind_of(UIView)
  end

end

Version data entries

24 entries across 18 versions & 1 rubygems

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