Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

Readme fixes #23

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Expand Up @@ -94,6 +94,7 @@ For example `MyTest.m`:

- (BOOL)shouldRunOnMainThread {
// By default NO, but if you have a UI test or test dependent on running on the main thread return YES
return NO;
}

- (void)setUpClass {
Expand All @@ -113,13 +114,15 @@ For example `MyTest.m`:
}

- (void)testFoo {
GHTestLog(@"I can log to the GHUnit test console: %@", foo);
NSString *a = @"foo";
GHTestLog(@"I can log to the GHUnit test console: %@", a);

// Assert a is not NULL, with no custom error description
GHAssertNotNULL(a, nil);

// Assert equal objects, add custom error description
GHAssertEqualObjects(a, b, @"Foo should be equal to: %@. Something bad happened", bar);
NSString *b = @"bar";
GHAssertEqualObjects(a, b, @"a should be equal to: %@. Something bad happened", b);
}

- (void)testBar {
Expand All @@ -138,6 +141,7 @@ You should see something like:

## Adding a GHUnit Test Target (iOS)

- If you are building from source, run `make` from within the `Project-IPhone` directory to create `GHUnitIOS.framework`.
- Add a `New Target`. Select `Cocoa Touch -> Application`. Name it `Tests` (or something similar).
- Add the `GHUnitIOS.framework` to your project.
- Add the following frameworks to `Linked Libraries`:
Expand Down Expand Up @@ -169,6 +173,7 @@ For example `MyTest.m`:

- (BOOL)shouldRunOnMainThread {
// By default NO, but if you have a UI test or test dependent on running on the main thread return YES
return NO;
}

- (void)setUpClass {
Expand All @@ -189,10 +194,12 @@ For example `MyTest.m`:

- (void)testFoo {
// Assert a is not NULL, with no custom error description
NSString *a = @"foo";
GHAssertNotNULL(a, nil);

// Assert equal objects, add custom error description
GHAssertEqualObjects(a, b, @"Foo should be equal to: %@. Something bad happened", bar);
NSString *b = @"bar";
GHAssertEqualObjects(a, b, @"a should be equal to: %@. Something bad happened", b);
}

- (void)testBar {
Expand Down