Skip to content

Commit

Permalink
generate
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Feb 8, 2015
1 parent ed058e9 commit 7e2d431
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 20 deletions.
11 changes: 3 additions & 8 deletions - Tooling_for_different_types_of_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Choosing what you are going to base your tests on is a tricky problem.

There are a few BDD frameworks in the Cocoa world. They typically are two separate libraries and fit well with each other. One part is a testing scaffolding which makes it easy to re-use code in your tests, and the other is a collection of matchers that make expressing the validations more natural.

Typically they aim to be familiar to people who have written test using [RSpec][1], a ruby BDD framework.
Typically they aim to be familiar to people who have written test using [RSpec](http://rspec.info), a ruby BDD framework.

So for example, this is a testing scaffold for the BDD framework Specta:

Expand Down Expand Up @@ -37,11 +37,6 @@ expect(stackView.subviews[0]()).to.beKindOf([UILabel class]());
#### Networking:
One of the more interesting uses of the Cocoa runtimes is that you can easily replace one method with another. This is used quite skillfully by some developers to hijack normal network requests and replace them with a stubbed request that you have set up in your test.

There are two libraries that are built to make it easy for you to hijack one request at a time and to make that run as you would like. They are [Nocilla][4] and [OHHTTPStubs][5] - I would recommend either, they both are mature, up-to-date and have expressive APIs.
There are two libraries that are built to make it easy for you to hijack one request at a time and to make that run as you would like. They are [Nocilla](https://github.com/luisobo/Nocilla) and [OHHTTPStubs](https://github.com/AliSoftware/OHHTTPStubs) - I would recommend either, they both are mature, up-to-date and have expressive APIs.

There is another networking library which takes a different approach. It is [VCRURLConnection][6] and it’s approach is to provide recorded sessions of HTTP traffic. This makes it possible to do larger integrations when you’re testing a lot of concurrent HTTP traffic. I abuse this feature to add a developer’s offline mode in an app.

[1]: http://rspec.info
[4]: https://github.com/luisobo/Nocilla
[5]: https://github.com/AliSoftware/OHHTTPStubs
[6]: https://github.com/dstnbrkr/VCRURLConnection
There is another networking library which takes a different approach. It is [VCRURLConnection](https://github.com/dstnbrkr/VCRURLConnection) and it’s approach is to provide recorded sessions of HTTP traffic. This makes it possible to do larger integrations when you’re testing a lot of concurrent HTTP traffic. I abuse this feature to add a developer’s offline mode in an app.
12 changes: 12 additions & 0 deletions .UlyssesRoot
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?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>defaultPathExtensions</key>
<string>md</string>
<key>textFileType</key>
<string>Markdown</string>
<key>useInlineLinks</key>
<true/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.Ulysses-Group.plist
*.marked
.DS_Store
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,20 @@ An ebook about pragmatic testing strategies. You can grab the [epub here][1] - i

| Topics | Last Updated |
| -------|--------------|
|[Core Data\_migrations][2]|12 Sep|
|[Developer Operations][3]|12 Sep|
|[Getting Setup][4]|12 Sep|
|[How Can\_i\_be\_pragmatic][5]|12 Sep|
|[How I\_got\_started][6]|12 Sep|
|[Introducing Tests\_into\_an\_existing\_app][7]|12 Sep|
|[Recommended Websites][8]|12 Sep|
|[Stubbed Core\_data][9]|12 Sep|
|[Types Of\_testing][10]|12 Sep|
|[Useful Terminology][11]|12 Sep|
|[What And\_why][12]|12 Sep|
|[What Is\_xctest][13]|12 Sep|
|[- Tooling For_different_types_of_testing](- Tooling_for_different_types_of_testing.md)|08 Feb|
|[Core Data_migrations](core_data_migrations.md)|11 Sep|
|[Developer Operations](developer_operations.md)|07 Feb|
|[Getting Setup](getting_setup.md)|11 Sep|
|[How Can_i_be_pragmatic](how_can_i_be_pragmatic.md)|07 Feb|
|[How I_got_started](how_i_got_started.md)|11 Sep|
|[Introducing Tests_into_an_existing_app](introducing_tests_into_an_existing_app.md)|07 Feb|
|[Recommended Websites](recommended_websites.md)|11 Sep|
|[Stubbed Core_data](stubbed_core_data.md)|07 Feb|
|[Techniques For_avoiding_async_testing](Techniques_for_avoiding_Async_Testing.md)|07 Feb|
|[Types Of_testing](types_of_testing.md)|11 Sep|
|[Useful Terminology](useful_terminology.md)|11 Sep|
|[What And_why](what_and_why.md)|11 Sep|
|[What Is_xctest](what_is_xctest.md)|11 Sep|

##### Generating the ebook

Expand Down
Binary file modified pragmatic_testing.epub
Binary file not shown.

0 comments on commit 7e2d431

Please sign in to comment.