Skip to content

Commit 92900ae

Browse files
committed
Add a failing test
1 parent 645c93e commit 92900ae

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ReactiveTaskTests/TaskSpec.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ import Result
1515

1616
class TaskSpec: QuickSpec {
1717
override func spec() {
18+
it("should notify that a task was launched") {
19+
var isLaunched: Bool = false
20+
21+
_ = launchTask(Task("/usr/bin/true"))
22+
.on(next: { event in
23+
if case .Launch = event {
24+
isLaunched = true
25+
}
26+
})
27+
.wait()
28+
29+
expect(isLaunched) == true
30+
}
31+
1832
it("should launch a task that writes to stdout") {
1933
let result = launchTask(Task("/bin/echo", arguments: [ "foobar" ]))
2034
.reduce(NSMutableData()) { aggregated, event in

0 commit comments

Comments
 (0)