             expect(NSNumber.numberWithInteger(1)).toNot(beAnInstanceOf(NSNumber))
         }
     }
+
+    func testContains() {
+        expect([1, 2, 3]).to(contain(1))
+        expect([1, 2, 3] as CInt[]).to(contain(1))
+        expect("foo").to(contain("o"))
+        expect(["foo", "bar", "baz"]).to(contain("baz"))
+        expect([1, 2, 3]).toNot(contain(4))
+        expect("foo").toNot(contain("z"))
+        expect(["foo", "bar", "baz"]).toNot(contain("ba"))
+
+        failsWithErrorMessage("expected <[a, b, c]> to contain <bar>") {
+            expect(["a", "b", "c"]).to(contain("bar"))
+        }
+        failsWithErrorMessage("expected <[a, b, c]> to not contain <b>") {
+            expect(["a", "b", "c"]).toNot(contain("b"))
+        }
+    }
+
+    func testBeginWith() {
+        expect([1, 2, 3]).to(beginWith(1))
+        expect([1, 2, 3]).toNot(beginWith(2))
+        expect("foobar").to(beginWith("foo"))
+        expect("foobar").toNot(beginWith("oo"))
+
+        failsWithErrorMessage("expected <[1, 2, 3]> to begin with <2>") {
+            expect([1, 2, 3]).to(beginWith(2))
+        }
+        failsWithErrorMessage("expected <[1, 2, 3]> to not begin with <1>") {
+            expect([1, 2, 3]).toNot(beginWith(1))
+        }
+        failsWithErrorMessage("expected <batman> to begin with <atm>") {
+            expect("batman").to(beginWith("atm"))
+        }
+        failsWithErrorMessage("expected <batman> to not begin with <bat>") {
+            expect("batman").toNot(beginWith("bat"))
+        }
+    }
+
+    func testEndWith() {
+        expect([1, 2, 3]).to(endWith(3))
+        expect([1, 2, 3]).toNot(endWith(2))
+        expect("foobar").to(endWith("bar"))
+        expect("foobar").toNot(endWith("oo"))
+
+        failsWithErrorMessage("expected <[1, 2, 3]> to end with <2>") {
+            expect([1, 2, 3]).to(endWith(2))
+        }
+        failsWithErrorMessage("expected <[1, 2, 3]> to not end with <3>") {
+            expect([1, 2, 3]).toNot(endWith(3))
+        }
+        failsWithErrorMessage("expected <batman> to end with <atm>") {
+            expect("batman").to(endWith("atm"))
+        }
+        failsWithErrorMessage("expected <batman> to not end with <man>") {
+            expect("batman").toNot(endWith("man"))
+        }
+    }
 }


        expect(nil).toNot(equalTo(1))
        expect(1).toNot(equalTo(nil))
        expect(nil).to(equalTo(nil))

        expect {
            1

            value = 0
        }
        expect(value).toEventuallyNot(equalTo(1))
    }

    func testAsyncCallback() {
        waitUntil { done in
            done()
        }
        waitUntil { done in
            NSThread.sleepForTimeInterval(0.5)
            done()
        }
        failsWithErrorMessage("Waited more than 1.0 second") {
            waitUntil(timeout: 1) { done in return }
        }
        failsWithErrorMessage("Waited more than 2.0 seconds") {
            waitUntil(timeout: 2) { done in return }
        }
    }

    func testCapturingOfException() {
