Sha256: 11f05980c632ae8cac44249aca6b27acde0b260870141e95f5934457503829c8

Contents?: true

Size: 702 Bytes

Versions: 15

Compression:

Stored size: 702 Bytes

Contents

describe 'Remove views' do
  before do
    @subject = TestRemoveLayout.new.build
  end

  it 'should remove the #label view' do
    @subject.get(:label).should.be.kind_of(UILabel)
    @subject.remove_label
    @subject.get(:label).should.be.nil
  end

  it 'should forget the #image view' do
    image = @subject.get(:image)
    image.should.be.kind_of(UIImageView)
    @subject.forget_image
    @subject.get(:image).should.be.nil
    image.superview.should.not.be.nil
  end

  it 'should remove the #view from the hierarchy' do
    view = @subject.get(:view)
    view.should.be.kind_of(UIView)
    @subject.remove_view
    @subject.get(:view).should.be.nil
    view.superview.should.be.nil
  end

end

Version data entries

15 entries across 14 versions & 1 rubygems

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