<commit_before>stubble [![Build Status](https://travis-ci.org/Stubble/stubble.svg)](https://travis-ci.org/Stubble/stubble) [![Cocoa Pod](http://cocoapod-badges.herokuapp.com/p/stubble/badge.svg)](http://cocoapods.org/?q=stubble) [![Cocoa Pod](http://cocoapod-badges.herokuapp.com/v/stubble/badge.svg)](http://cocoapods.org/?q=stubble)
=======

Mocking Objective-C since [NSDate dateWithTimeIntervalSinceReferenceDate:408029584]

Using stubble
=======

Project Setup
-------
Stubble can be imported as a subproject in Xcode or as a .framework. If imported as a subproject, make sure you update the Header Search Paths in the build settings for your Test target, and to update the Link Binary With Libraries in Build Phases.

In the build settings for your Test target, under `OtherLinkerFlags` add `-ObjC` and `-all_load`.

Creating a Mock
------

    mock([ClassToMock class]);

### Note with ESCObservable
If you are using ESCObservable and intend to fire events from your mock object, you'll need to declare your mock objects as:

    ClassToMock<ESCObservableInternal> *mockObject = mock(ClassToMock);
    [mockObject escRegisterObserverProtocol:@protocol(ClassToMockObserver)];

Creating a stub
------

    [when([ClassToMock methodToStub]) thenReturn:@"string"];

### Note with ESCObservable
You can do something like this:

    [mockObject.escNotifier notificationMethod];

Verifying calls
------

    verifyCalled([ClassToMock methodToStub]);<commit_msg>Updating README.md to point to documentation site -Kartik<commit_after>stubble [![Build Status](https://travis-ci.org/Stubble/stubble.svg)](https://travis-ci.org/Stubble/stubble) [![Cocoa Pod](http://cocoapod-badges.herokuapp.com/p/stubble/badge.svg)](http://cocoapods.org/?q=stubble) [![Cocoa Pod](http://cocoapod-badges.herokuapp.com/v/stubble/badge.svg)](http://cocoapods.org/?q=stubble)
=======

Mocking Objective-C since [NSDate dateWithTimeIntervalSinceReferenceDate:408029584]

Documentation Here: http://stubble.github.io
{'fraction_non_alphanumeric': 0.14271356783919598, 'fraction_numerical': 0.009045226130653266, 'mean_word_length': 5.221875, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7068844', 'n_tokens_mistral': 672, 'n_tokens_neox': 637, 'n_words': 152}