Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Thuong Nguyen committed Jan 9, 2016
0 parents commit 0e1b10f
Show file tree
Hide file tree
Showing 21 changed files with 1,143 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# OS X
.DS_Store

# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa

# Bundler
.bundle

Carthage
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Note: if you ignore the Pods directory, make sure to uncomment
# `pod install` in .travis.yml
#
# Pods/
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage

language: objective-c
# cache: cocoapods
# podfile: Example/Podfile
# before_install:
# - gem install cocoapods # Since Travis is not always on latest version
# - pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -workspace Example/ZAlertView.xcworkspace -scheme ZAlertView-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
15 changes: 15 additions & 0 deletions Example/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

target 'ZAlertView_Example', :exclusive => true do
pod "ZAlertView", :path => "../"
end

target 'ZAlertView_Tests', :exclusive => true do
pod "ZAlertView", :path => "../"

pod 'Quick', '~> 0.8.0'
pod 'Nimble', '3.0.0'
pod 'FBSnapshotTestCase'
pod 'Nimble-Snapshots'
end
24 changes: 24 additions & 0 deletions Example/Tests/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
50 changes: 50 additions & 0 deletions Example/Tests/Tests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// https://github.com/Quick/Quick

import Quick
import Nimble
import ZAlertView

class TableOfContentsSpec: QuickSpec {
override func spec() {
describe("these will fail") {

it("can do maths") {
expect(1) == 2
}

it("can read") {
expect("number") == "string"
}

it("will eventually fail") {
expect("time").toEventually( equal("done") )
}

context("these will pass") {

it("can do maths") {
expect(23) == 23
}

it("can read") {
expect("🐮") == "🐮"
}

it("will eventually pass") {
var time = "passing"

dispatch_async(dispatch_get_main_queue()) {
time = "done"
}

waitUntil { done in
NSThread.sleepForTimeInterval(0.5)
expect(time) == "done"

done()
}
}
}
}
}
}
Loading

0 comments on commit 0e1b10f

Please sign in to comment.