View+MASAdditionsSpec.m
1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// View+MASAdditionsSpec.m
// Masonry
//
// Created by Jonas Budelmann on 8/09/13.
// Copyright (c) 2013 Jonas Budelmann. All rights reserved.
//
#import "View+MASAdditions.h"
SpecBegin(View_MASAdditions)
- (void)testSetTranslatesAutoresizingMaskIntoConstraints {
MAS_VIEW *newView = MAS_VIEW.new;
[newView mas_makeConstraints:^(MASConstraintMaker *make) {
expect(make.updateExisting).to.beFalsy();
}];
expect(newView.translatesAutoresizingMaskIntoConstraints).to.beFalsy();
}
- (void)testSetUpdateExisting {
MAS_VIEW *newView = MAS_VIEW.new;
[newView mas_updateConstraints:^(MASConstraintMaker *make) {
expect(make.updateExisting).to.beTruthy();
}];
expect(newView.translatesAutoresizingMaskIntoConstraints).to.beFalsy();
}
- (void)testSetRemoveExisting {
MAS_VIEW *newView = MAS_VIEW.new;
[newView mas_remakeConstraints:^(MASConstraintMaker *make) {
expect(make.removeExisting).to.beTruthy();
}];
expect(newView.translatesAutoresizingMaskIntoConstraints).to.beFalsy();
}
SpecEnd