Skip to content

Commit 8596ea4

Browse files
committed
Initial commit
0 parents  commit 8596ea4

File tree

15 files changed

+1025
-0
lines changed

15 files changed

+1025
-0
lines changed

.gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# OS X
2+
.DS_Store
3+
4+
# Xcode
5+
build/
6+
*.pbxuser
7+
!default.pbxuser
8+
*.mode1v3
9+
!default.mode1v3
10+
*.mode2v3
11+
!default.mode2v3
12+
*.perspectivev3
13+
!default.perspectivev3
14+
xcuserdata
15+
*.xccheckout
16+
profile
17+
*.moved-aside
18+
DerivedData
19+
*.hmap
20+
*.ipa
21+
22+
# Bundler
23+
.bundle
24+
25+
Carthage
26+
# We recommend against adding the Pods directory to your .gitignore. However
27+
# you should judge for yourself, the pros and cons are mentioned at:
28+
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
29+
#
30+
# Note: if you ignore the Pods directory, make sure to uncomment
31+
# `pod install` in .travis.yml
32+
#
33+
# Pods/

.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# references:
2+
# * http://www.objc.io/issue-6/travis-ci.html
3+
# * https://github.com/supermarin/xcpretty#usage
4+
5+
language: objective-c
6+
# cache: cocoapods
7+
# podfile: Example/Podfile
8+
# before_install:
9+
# - gem install cocoapods # Since Travis is not always on latest version
10+
# - pod install --project-directory=Example
11+
script:
12+
- set -o pipefail && xcodebuild test -workspace Example/VectorKit.xcworkspace -scheme VectorKit-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty
13+
- pod lib lint

Example/Podfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
source 'https://github.com/CocoaPods/Specs.git'
2+
use_frameworks!
3+
4+
5+
target 'VectorKit_Tests', :exclusive => true do
6+
pod 'VectorKit', :path => '../'
7+
8+
pod 'Quick', '~> 0.8'
9+
pod 'Nimble', '~> 3.0'
10+
end

Example/Tests/Info.plist

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>BNDL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>1</string>
23+
</dict>
24+
</plist>

Example/Tests/Tests.swift

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// https://github.com/Quick/Quick
2+
3+
import Quick
4+
import Nimble
5+
import VectorKit
6+
7+
class TableOfContentsSpec: QuickSpec {
8+
override func spec() {
9+
describe("these will fail") {
10+
11+
it("can do maths") {
12+
expect(1) == 2
13+
}
14+
15+
it("can read") {
16+
expect("number") == "string"
17+
}
18+
19+
it("will eventually fail") {
20+
expect("time").toEventually( equal("done") )
21+
}
22+
23+
context("these will pass") {
24+
25+
it("can do maths") {
26+
expect(23) == 23
27+
}
28+
29+
it("can read") {
30+
expect("🐮") == "🐮"
31+
}
32+
33+
it("will eventually pass") {
34+
var time = "passing"
35+
36+
dispatch_async(dispatch_get_main_queue()) {
37+
time = "done"
38+
}
39+
40+
waitUntil { done in
41+
NSThread.sleepForTimeInterval(0.5)
42+
expect(time) == "done"
43+
44+
done()
45+
}
46+
}
47+
}
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)