Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
senart committed Aug 21, 2019
1 parent 0d67261 commit 83cdef2
Showing 1 changed file with 16 additions and 31 deletions.
47 changes: 16 additions & 31 deletions Example/Tests/Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,28 @@ import EnvChanger

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

describe("these will pass") {
it("can do maths") {
expect(1) == 2
expect(23) == 23
}

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

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

context("these will pass") {

it("can do maths") {
expect(23) == 23
it("will eventually pass") {
var time = "passing"

DispatchQueue.main.async {
time = "done"
}

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

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

DispatchQueue.main.async {
time = "done"
}

waitUntil { done in
Thread.sleep(forTimeInterval: 0.5)
expect(time) == "done"

done()
}

waitUntil { done in
Thread.sleep(forTimeInterval: 0.5)
expect(time) == "done"

done()
}
}
}
Expand Down

0 comments on commit 83cdef2

Please sign in to comment.