Skip to content

Commit 40f88f3

Browse files
committed
Remove force unwrap + fix Travis CI build
1 parent d504366 commit 40f88f3

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ env:
99
- DESTINATION="platform=iOS Simulator,OS=latest,name=iPhone 5"
1010

1111
before_install:
12-
- brew update
13-
- brew upgrade
12+
# - brew update
13+
# - brew upgrade
1414
- gem update
1515
- gem install xcpretty
1616
- gem install xcpretty-travis-formatter

GLTableCollectionViewTests/GLTableCollectionViewTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ final class GLTableCollectionViewTests: XCTestCase {
152152
func testCollectionViewPaginationConsistency() {
153153
XCTAssertGreaterThan(visibleCells.count, 0, "UITableView visible cells must be greater than 0")
154154

155-
for collectionTableCell: GLCollectionTableViewCell in visibleCells as! [GLCollectionTableViewCell] {
155+
visibleCells.forEach { cell in
156+
guard let collectionTableCell: GLCollectionTableViewCell = cell as? GLCollectionTableViewCell else {
157+
fatalError("UITableViewCells must be GLCollectionTableViewCell")
158+
}
159+
156160
if collectionTableCell.collectionViewPaginatedScroll == true {
157161
XCTAssertTrue(collectionTableCell.collectionView.isScrollEnabled,
158162
"If custom paginated scroll is enabled the UICollectionView should be scrollable")

0 commit comments

Comments
 (0)