Sha256: a48738b64341ab0b5c77c1afd48612bddda8d5c68334434572a320c1c89d3346

Contents?: true

Size: 514 Bytes

Versions: 13

Compression:

Stored size: 514 Bytes

Contents

describe 'Constraints - activate/deactivate helpers' do

  before do
    @layout = MotionKit::Layout.new
    @constraint = nil
    @view = UIView.new
  end

  should 'should activate/deactivate constraints' do

    @layout.context(@view) do
      @layout.constraints do
        @constraint = @layout.height(10)
      end
    end

    @view.constraints.count.should == 1
    @constraint.deactivate
    @view.constraints.count.should == 0
    @constraint.activate
    @view.constraints.count.should == 1

  end

end

Version data entries

13 entries across 7 versions & 1 rubygems

Version Path
motion-kit-1.1.1 spec/ios/constraints_helpers/active_constraints_spec.rb
motion-kit-1.1.1 spec/tvos/constraints_helpers/active_constraints_spec.rb
motion-kit-1.1.0 spec/tvos/constraints_helpers/active_constraints_spec.rb
motion-kit-1.1.0 spec/ios/constraints_helpers/active_constraints_spec.rb
motion-kit-1.0.3 spec/tvos/constraints_helpers/active_constraints_spec.rb
motion-kit-1.0.3 spec/ios/constraints_helpers/active_constraints_spec.rb
motion-kit-1.0.2 spec/tvos/constraints_helpers/active_constraints_spec.rb
motion-kit-1.0.2 spec/ios/constraints_helpers/active_constraints_spec.rb
motion-kit-1.0.1 spec/tvos/constraints_helpers/active_constraints_spec.rb
motion-kit-1.0.1 spec/ios/constraints_helpers/active_constraints_spec.rb
motion-kit-1.0.0 spec/tvos/constraints_helpers/active_constraints_spec.rb
motion-kit-1.0.0 spec/ios/constraints_helpers/active_constraints_spec.rb
motion-kit-0.18.0 spec/ios/constraints_helpers/active_constraints_spec.rb