Sha256: 7d7ad6b037f1f969fd0465ef7fe498bbcc8e2e7a5cad78bf0a11ad1440e501aa

Contents?: true

Size: 1.04 KB

Versions: 42

Compression:

Stored size: 1.04 KB

Contents

describe 'Constraints - relationship lookup' do

  it 'should return NSLayoutRelationEqual' do
    MotionKit::Constraint.relationship_lookup(:equal).should == NSLayoutRelationEqual
    MotionKit::Constraint.relationship_lookup(NSLayoutRelationEqual).should == NSLayoutRelationEqual
  end

  it 'should return NSLayoutRelationGreaterThanOrEqual' do
    MotionKit::Constraint.relationship_lookup(:gte).should == NSLayoutRelationGreaterThanOrEqual
    MotionKit::Constraint.relationship_lookup(NSLayoutRelationGreaterThanOrEqual).should == NSLayoutRelationGreaterThanOrEqual
  end

  it 'should raise InvalidRelationshipError' do
    -> do
      MotionKit::Constraint.relationship_lookup(:foo)
    end.should.raise(MotionKit::InvalidRelationshipError)
  end

  it 'should reverse NSLayoutRelationEqual' do
    MotionKit::Constraint.relationship_reverse(NSLayoutRelationEqual).should == :equal
  end

  it 'should reverse NSLayoutRelationGreaterThanOrEqual' do
    MotionKit::Constraint.relationship_reverse(NSLayoutRelationGreaterThanOrEqual).should == :gte
  end

end

Version data entries

42 entries across 36 versions & 1 rubygems

Version Path
motion-kit-0.12.0 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.11.2 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.11.1 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.11.0 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.11 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.10 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.9 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.8 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.7 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.6 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.5 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.4 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.3 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.2 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.1 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.10.0 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.9.6 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.9.4 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.9.3 spec/ios/constraints_helpers/relationship_lookup_spec.rb
motion-kit-0.9.2 spec/ios/constraints_helpers/relationship_lookup_spec.rb