Sha256: 2482e168f5905228bdc2702a02231059e409332dfa1bbf0546fac3ae7bc930ab
Contents?: true
Size: 1007 Bytes
Versions: 18
Compression:
Stored size: 1007 Bytes
Contents
describe MotionKit::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
18 entries across 18 versions & 1 rubygems