Latest 0.0.5
Homepage https://github.com/itsthejb/TestPilot
License MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
Platforms ios 4.3, osx 10.6, requires ARC
Authors

Unit-testing Cocoa just got easy. Your one-stop shop for unit testing iOS and OS X applications. Just one Pod, one header import and you’re good to go.

NB: Very initial alpha release.


What’s New

v0.0.4

  • Cocoapods-based master project.
  • UIKit animation overrides.
  • Date string matchers.
  • URL string matchers.
  • TPProxy – logs and ignores all messages.
  • OCUnit convenience macros.

v0.0.4

  • Convenience assertion macros, assertTrue(), assertFalse(), assertNil(), assertNotNil()
  • nil-safe equality macro TPIsEqual(x,y), whereby (nil == nil) == YES.

v0.0.2/3

  • Initial releases.

Features

Incorporated Libraries

  • OCMock, mock objects framework.
  • OCHamcrest, pattern matchers library.
  • OCMockito, another mock object framework.
  • Stubbilino, and library for method stubbing and swizzling.
  • Kiwi, a behavioural driven development library.

Built-in (Some upcoming)

  • Easy stubbing of common framework classes (UIApplication, UIApplicationDelegate…)
  • More testable NSNotificationCentre
  • Manipulate +[NSDate date]
  • Make UIView subclasses testable in the simulator
  • And more…!

Installation

This project is 100% intended for installation via CocoaPods.

  1. Example installation in your Podfile for a mixed iOS/OS X library project:

    target :MyLibraryOSXTests do
        platform :osx
        pod 'TestPilot'
    end
    
    target :MyLibraryiOSTests do
        platform :ios
        pod 'TestPilot'
    end
  2. Import the header file TestPilot.h to your project – preferably into your test bundle .pch file and you’re good to go!

  3. Get testing with the provided frameworks.

  4. You may wish to add the inhibit_all_warnings! to your Podfile to quieten your builds.

Notes to self

  • Install Doxygen?
  • Have to turn on code coverage?
  • Prevent use with main bundle (main.m detection)
  • Warning:

    [!] The target `FooTests [Debug - Release]' overrides the `FRAMEWORK_SEARCH_PATHS' build setting defined in `Pods/Pods-FooTests.xcconfig'.
        - Use the `$(inherited)' flag, or
        - Remove the build settings from the target.

Contact

[email protected]

Latest podspec

{
    "name": "TestPilot",
    "version": "0.0.5",
    "summary": "Unit-testing Cocoa just got easy.",
    "homepage": "https://github.com/itsthejb/TestPilot",
    "license": {
        "type": "MIT",
        "text": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE"
    },
    "authors": {
        "Jonathan Crooke": "[email protected]"
    },
    "source": {
        "git": "https://github.com/itsthejb/TestPilot.git",
        "tag": "v0.0.5"
    },
    "platforms": {
        "ios": "4.3",
        "osx": "10.6"
    },
    "requires_arc": true,
    "subspecs": [
        {
            "name": "Core-iOS",
            "source_files": [
                "TestPilot/Classes/Shared/**/*.{h,m}",
                "TestPilot/Classes/Core-iOS/**/*.{h,m}"
            ],
            "frameworks": "UIKit",
            "platforms": {
                "ios": null
            },
            "dependencies": {
                "OCHamcrest": [
                    "1.9"
                ],
                "OCMock": [
                    "2.0.1"
                ],
                "OCMockito": [
                    "0.23"
                ],
                "Expecta": [
                    "0.2.1"
                ]
            }
        },
        {
            "name": "Core-OSX",
            "source_files": [
                "TestPilot/Classes/Shared/**/*.{h,m}",
                "TestPilot/Classes/Core-OSX/**/*.{h,m}"
            ],
            "frameworks": "AppKit",
            "platforms": {
                "osx": null
            },
            "dependencies": {
                "OCHamcrest": [
                    "1.9"
                ],
                "OCMock": [
                    "2.0.1"
                ],
                "OCMockito": [
                    "0.23"
                ],
                "Expecta": [
                    "0.2.1"
                ]
            }
        },
        {
            "name": "Stubbilino",
            "platforms": {
                "ios": null
            },
            "dependencies": {
                "Stubbilino": [
                    "0.1.1"
                ]
            }
        },
        {
            "name": "Kiwi",
            "dependencies": {
                "Kiwi": [
                    "2.0.5"
                ]
            }
        },
        {
            "name": "Specta",
            "dependencies": {
                "Specta": [
                    "0.1.8"
                ]
            }
        },
        {
            "name": "AppHelpers",
            "source_files": "TestPilot/AppHelpers"
        }
    ]
}

Pin It on Pinterest

Share This