{"id":15048365,"url":"https://github.com/github/quick","last_synced_at":"2026-01-10T23:59:05.224Z","repository":{"id":21412824,"uuid":"24730862","full_name":"github/Quick","owner":"github","description":"A behavior-driven development test framework for Swift and Objective-C.","archived":true,"fork":true,"pushed_at":"2014-11-17T06:48:15.000Z","size":1333,"stargazers_count":18,"open_issues_count":0,"forks_count":8,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-09-25T21:11:05.537Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Quick/Quick","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-02T18:21:21.000Z","updated_at":"2024-07-31T03:22:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/github/Quick","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2FQuick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2FQuick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2FQuick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2FQuick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/Quick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219876581,"owners_count":16554769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T21:11:08.640Z","updated_at":"2025-10-04T08:31:30.177Z","avatar_url":"https://github.com/github.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](http://f.cl.ly/items/0r1E192C1R0b2g2Q3h2w/QuickLogo_Color.png)\n\nQuick is a behavior-driven development framework for Swift and Objective-C.\nInspired by [RSpec](https://github.com/rspec/rspec), [Specta](https://github.com/specta/specta), and [Ginkgo](https://github.com/onsi/ginkgo).\n\n[![Build Status](https://travis-ci.org/Quick/Quick.svg)](https://travis-ci.org/Quick/Quick)\n\n![](https://raw.githubusercontent.com/Quick/Assets/master/Screenshots/QuickSpec%20screenshot.png)\n\n```swift\n// Swift\n\nimport Quick\nimport Nimble\n\nclass TableOfContentsSpec: QuickSpec {\n  override func spec() {\n    describe(\"the table of contents below\") {\n      it(\"has everything you need to get started\") {\n        let sections = TableOfContents().sections\n        expect(sections).to(contain(\"Quick: Examples and Example Groups\"))\n        expect(sections).to(contain(\"Nimble: Assertions using expect(...).to\"))\n        expect(sections).to(contain(\"How to Install Quick\"))\n      }\n\n      context(\"if it doesn't have what you're looking for\") {\n        it(\"needs to be updated\") {\n          let you = You(awesome: true)\n          expect{you.submittedAnIssue}.toEventually(beTruthy())\n        }\n      }\n    }\n  }\n}\n```\n\n# How to Use Quick\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Quick: Examples and Example Groups](#quick-examples-and-example-groups)\n  - [Examples Using `it`](#examples-using-it)\n  - [Example Groups Using `describe` and `context`](#example-groups-using-describe-and-context)\n    - [Describing Classes and Methods Using `describe`](#describing-classes-and-methods-using-describe)\n    - [Sharing Setup/Teardown Code Using `beforeEach` and `afterEach`](#sharing-setupteardown-code-using-beforeeach-and-aftereach)\n    - [Specifying Conditional Behavior Using `context`](#specifying-conditional-behavior-using-context)\n  - [Temporarily Disabling Examples or Groups Using `pending`](#temporarily-disabling-examples-or-groups-using-pending)\n    - [Shorthand syntax](#shorthand-syntax)\n  - [Global Setup/Teardown Using `beforeSuite` and `afterSuite`](#global-setupteardown-using-beforesuite-and-aftersuite)\n  - [Sharing Examples](#sharing-examples)\n- [Using Quick in Objective-C: The Optional Shorthand Syntax](#using-quick-in-objective-c-the-optional-shorthand-syntax)\n- [Nimble: Assertions Using `expect(...).to`](#nimble-assertions-using-expectto)\n- [Testing UIKit with Quick](#testing-uikit-with-quick)\n- [How to Install Quick](#how-to-install-quick)\n  - [1. Clone the Quick and Nimble repositories](#1-clone-the-quick-and-nimble-repositories)\n  - [2. Add `Quick.xcodeproj` and `Nimble.xcodeproj` to your test target](#2-add-quickxcodeproj-and-nimblexcodeproj-to-your-test-target)\n  - [3. Link `Quick.framework` and `Nimble.framework`](#3-link-quickframework-and-nimbleframework)\n  - [4. Start writing specs!](#4-start-writing-specs!)\n- [Including Quick in a Git Repository Using Submodules](#including-quick-in-a-git-repository-using-submodules)\n  - [Adding Quick as a Git Submodule](#adding-quick-as-a-git-submodule)\n  - [Updating the Quick Submodule](#updating-the-quick-submodule)\n  - [Cloning a Repository that Includes a Quick Submodule](#cloning-a-repository-that-includes-a-quick-submodule)\n- [How to Install Quick File Templates](#how-to-install-quick-file-templates)\n  - [Using Alcatraz](#using-alcatraz)\n  - [Manually via the Rakefile](#manually-via-the-rakefile)\n- [Who Uses Quick](#who-uses-quick)\n- [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Quick: Examples and Example Groups\n\nQuick uses a special syntax to define **examples** and **example groups**.\n\n### Examples Using `it`\n\nExamples, defined with the `it` function, use assertions to demonstrate\nhow code should behave. These are like \"tests\" in XCTest.\n\n`it` takes two parameters: the name of the example, and a closure.\nThe examples below specify how the `Dolphin` class should behave.\nA new dolphin should be smart and friendly:\n\n```swift\n// Swift\n\nimport Quick\nimport Nimble\n\nclass DolphinSpec: QuickSpec {\n  override func spec() {\n    it(\"is friendly\") {\n      expect(Dolphin().isFriendly).to(beTruthy())\n    }\n\n    it(\"is smart\") {\n      expect(Dolphin().isSmart).to(beTruthy())\n    }\n  }\n}\n```\n\n```objc\n// Objective-C\n\n#import \u003cQuick/Quick.h\u003e\n#import \u003cNimble/Nimble.h\u003e\n\nQuickSpecBegin(DolphinSpec)\n\nit(@\"is friendly\", ^{\n  expect(@([[Dolphin new] isFriendly])).to(beTruthy());\n});\n\nit(@\"is smart\", ^{\n  expect(@([[Dolphin new] isSmart])).to(beTruthy());\n});\n\nQuickSpecEnd\n```\n\n\u003e Descriptions can use any character, including characters from languages\n  besides English, or even emoji! :v: :sunglasses:\n\n### Example Groups Using `describe` and `context`\n\nExample groups are logical groupings of examples. Example groups can share\nsetup and teardown code.\n\n#### Describing Classes and Methods Using `describe`\n\nTo specify the behavior of the `Dolphin` class's `click` method--in\nother words, to test the method works--several `it` examples can be\ngrouped together using the `describe` function. Grouping similar\nexamples together makes the spec easier to read:\n\n```swift\n// Swift\n\nimport Quick\nimport Nimble\n\nclass DolphinSpec: QuickSpec {\n  override func spec() {\n    describe(\"a dolphin\") {\n      describe(\"its click\") {\n        it(\"is loud\") {\n          let click = Dolphin().click()\n          expect(click.isLoud).to(beTruthy())\n        }\n\n        it(\"has a high frequency\") {\n          let click = Dolphin().click()\n          expect(click.hasHighFrequency).to(beTruthy())\n        }\n      }\n    }\n  }\n}\n```\n\n```objc\n// Objective-C\n\n#import \u003cQuick/Quick.h\u003e\n#import \u003cNimble/Nimble.h\u003e\n\nQuickSpecBegin(DolphinSpec)\n\ndescribe(@\"a dolphin\", ^{\n  describe(@\"its click\", ^{\n    it(@\"is loud\", ^{\n      Click *click = [[Dolphin new] click];\n      expect(@(click.isLoud)).to(beTruthy());\n    });\n\n    it(@\"has a high frequency\", ^{\n      Click *click = [[Dolphin new] click];\n      expect(@(click.hasHighFrequency)).to(beTruthy());\n    });\n  });\n});\n\nQuickSpecEnd\n```\n\n#### Sharing Setup/Teardown Code Using `beforeEach` and `afterEach`\n\nExample groups don't just make the examples clearer, they're also useful\nfor sharing setup and teardown code among examples in a group.\n\nIn the example below, the `beforeEach` function is used to create a brand\nnew instance of a dolphin and its click before each example in the group.\nThis ensures that both are in a \"fresh\" state for every example:\n\n```swift\n// Swift\n\nimport Quick\nimport Nimble\n\nclass DolphinSpec: QuickSpec {\n  override func spec() {\n    describe(\"a dolphin\") {\n      var dolphin: Dolphin?\n      beforeEach {\n        dolphin = Dolphin()\n      }\n\n      describe(\"its click\") {\n        var click: Click?\n        beforeEach {\n          click = dolphin!.click()\n        }\n\n        it(\"is loud\") {\n          expect(click!.isLoud).to(beTruthy())\n        }\n\n        it(\"has a high frequency\") {\n          expect(click!.hasHighFrequency).to(beTruthy())\n        }\n      }\n    }\n  }\n}\n```\n\n```objc\n// Objective-C\n\n#import \u003cQuick/Quick.h\u003e\n#import \u003cNimble/Nimble.h\u003e\n\nQuickSpecBegin(DolphinSpec)\n\ndescribe(@\"a dolphin\", ^{\n  __block Dolphin *dolphin = nil;\n  beforeEach(^{\n      dolphin = [Dolphin new];\n  });\n\n  describe(@\"its click\", ^{\n    __block Click *click = nil;\n    beforeEach(^{\n      click = [dolphin click];\n    });\n\n    it(@\"is loud\", ^{\n      expect(@(click.isLoud)).to(beTruthy());\n    });\n\n    it(@\"has a high frequency\", ^{\n      expect(@(click.hasHighFrequency)).to(beTruthy());\n    });\n  });\n});\n\nQuickSpecEnd\n```\n\nSharing setup like this might not seem like a big deal with the\ndolphin example, but for more complicated objects, it saves a lot\nof typing!\n\nTo execute code *after* each example, use `afterEach`.\n\n#### Specifying Conditional Behavior Using `context`\n\nDolphins use clicks for echolocation. When they approach something\nparticularly interesting to them, they release a series of clicks in\norder to get a better idea of what it is.\n\nThe tests need to show that the `click` method behaves differently in\ndifferent circumstances. Normally, the dolphin just clicks once. But when\nthe dolphin is close to something interesting, it clicks several times.\n\nThis can be expressed using `context` functions: one `context` for the\nnormal case, and one `context` for when the dolphin is close to\nsomething interesting:\n\n```swift\n// Swift\n\nimport Quick\nimport Nimble\n\nclass DolphinSpec: QuickSpec {\n  override func spec() {\n    describe(\"a dolphin\") {\n      var dolphin: Dolphin?\n      beforeEach { dolphin = Dolphin() }\n\n      describe(\"its click\") {\n        context(\"when the dolphin is not near anything interesting\") {\n          it(\"is only emitted once\") {\n            expect(dolphin!.click().count).to(equal(1))\n          }\n        }\n\n        context(\"when the dolphin is near something interesting\") {\n          beforeEach {\n            let ship = SunkenShip()\n            Jamaica.dolphinCove.add(ship)\n            Jamaica.dolphinCove.add(dolphin)\n          }\n\n          it(\"is emitted three times\") {\n            expect(dolphin!.click().count).to(equal(3))\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n```objc\n// Objective-C\n\n#import \u003cQuick/Quick.h\u003e\n#import \u003cNimble/Nimble.h\u003e\n\nQuickSpecBegin(DolphinSpec)\n\ndescribe(@\"a dolphin\", ^{\n  __block Dolphin *dolphin = nil;\n  beforeEach(^{ dolphin = [Dolphin new]; });\n\n  describe(@\"its click\", ^{\n    context(@\"when the dolphin is not near anything interesting\", ^{\n      it(@\"is only emitted once\", ^{\n        expect(@([[dolphin click] count])).to(equal(@1));\n      });\n    });\n\n    context(@\"when the dolphin is near something interesting\", ^{\n      beforeEach(^{\n        [[Jamaica dolphinCove] add:[SunkenShip new]];\n        [[Jamaica dolphinCove] add:dolphin];\n      });\n\n      it(@\"is emitted three times\", ^{\n        expect(@([[dolphin click] count])).to(equal(@3));\n      });\n    });\n  });\n});\n\nQuickSpecEnd\n```\n\n### Temporarily Disabling Examples or Groups Using `pending`\n\nFor examples that don't pass yet, use `pending`. Pending examples\nare not run, but are printed out along with the test results.\n\nThe example below marks the cases in which the dolphin is close to\nsomething interesting as \"pending\"--perhaps that functionality hasn't\nbeen implemented yet, but these tests have been written as reminders\nthat it should be soon:\n\n```swift\n// Swift\n\npending(\"when the dolphin is near something interesting\") {\n  // ...none of the code in this closure will be run.\n}\n```\n\n```objc\n// Objective-C\n\npending(@\"when the dolphin is near something interesting\", ^{\n  // ...none of the code in this closure will be run.\n});\n```\n\n#### Shorthand syntax\n\nExamples and groups can also be marked as pending by using\n`xdescribe`, `xcontext`, and `xit`:\n\n```swift\n// Swift\n\nxdescribe(\"its click\") {\n  // ...none of the code in this closure will be run.\n}\n\nxcontext(\"when the dolphin is not near anything interesting\") {\n  // ...none of the code in this closure will be run.\n}\n\nxit(\"is only emitted once\") {\n  // ...none of the code in this closure will be run.\n}\n```\n\n```objc\n// Objective-C\n\nxdescribe(@\"its click\", ^{\n  // ...none of the code in this closure will be run.\n});\n\nxcontext(@\"when the dolphin is not near anything interesting\", ^{\n  // ...none of the code in this closure will be run.\n});\n\nxit(@\"is only emitted once\", ^{\n  // ...none of the code in this closure will be run.\n});\n```\n\n### Global Setup/Teardown Using `beforeSuite` and `afterSuite`\n\nSome test setup needs to be performed before *any* examples are\nrun. For these cases, use `beforeSuite` and `afterSuite`.\n\nIn the example below, a database of all the creatures in the ocean is\ncreated before any examples are run. That database is torn down once all\nthe examples have finished:\n\n```swift\n// Swift\n\nimport Quick\n\nclass DolphinSpec: QuickSpec {\n  override func spec() {\n    beforeSuite {\n      OceanDatabase.createDatabase(name: \"test.db\")\n      OceanDatabase.connectToDatabase(name: \"test.db\")\n    }\n\n    afterSuite {\n      OceanDatabase.teardownDatabase(name: \"test.db\")\n    }\n\n    describe(\"a dolphin\") {\n      // ...\n    }\n  }\n}\n```\n\n```objc\n// Objective-C\n\n#import \u003cQuick/Quick.h\u003e\n\nQuickSpecBegin(DolphinSpec)\n\nbeforeSuite(^{\n  [OceanDatabase createDatabase:@\"test.db\"];\n  [OceanDatabase connectToDatabase:@\"test.db\"];\n});\n\nafterSuite(^{\n  [OceanDatabase teardownDatabase:@\"test.db\"];\n});\n\ndescribe(@\"a dolphin\", ^{\n  // ...\n});\n\nQuickSpecEnd\n```\n\n\u003e You can specify as many `beforeSuite` and `afterSuite` as you like. All\n  `beforeSuite` closures will be executed before any tests run, and all\n  `afterSuite` closures will be executed after all the tests are finished.\n  There is no guarantee as to what order these closures will be executed in.\n\n### Sharing Examples\n\nIn some cases, the same set of specifications apply to multiple objects.\n\nFor example, consider a protocol called `Edible`. When a dolphin\neats something `Edible`, the dolphin becomes happy. `Mackerel` and\n`Cod` are both edible. Quick allows you to easily test that a dolphin is\nhappy to eat either one.\n\nThe example below defines a set of  \"shared examples\" for \"something edible\",\nand specifies that both mackerel and cod behave like \"something edible\":\n\n```swift\n// Swift\n\nimport Quick\nimport Nimble\n\nclass EdibleSharedExamplesConfiguration: QuickConfiguration {\n  override class func configure(configuration: Configuration) {\n    sharedExamples(\"something edible\") { (sharedExampleContext: SharedExampleContext) in\n      it(\"makes dolphins happy\") {\n        let dolphin = Dolphin(happy: false)\n        let edible = sharedExampleContext()[\"edible\"]\n        dolphin.eat(edible)\n        expect(dolphin.isHappy).to(beTruthy())\n      }\n    }\n  }\n}\n\nclass MackerelSpec: QuickSpec {\n  override func spec() {\n    var mackerel: Mackerel! = nil\n    beforeEach {\n      mackerel = Mackerel()\n    }\n\n    itBehavesLike(\"something edible\") { [\"edible\": mackerel] }\n  }\n}\n\nclass CodSpec: QuickSpec {\n  override func spec() {\n    var cod: Cod! = nil\n    beforeEach {\n      cod = Cod()\n    }\n\n    itBehavesLike(\"something edible\") { [\"edible\": cod] }\n  }\n}\n```\n\n```objc\n// Objective-C\n\n#import \u003cQuick/Quick.h\u003e\n#import \u003cNimble/Nimble.h\u003e\n\nQuickConfigurationBegin(EdibleSharedExamplesConfiguration)\n\n+ (void)configure:(Configuration *configuration) {\n  sharedExamples(@\"something edible\", ^(QCKDSLSharedExampleContext exampleContext) {\n    it(@\"makes dolphins happy\") {\n      Dolphin *dolphin = [[Dolphin alloc] init];\n      dolphin.happy = NO;\n      id\u003cEdible\u003e edible = exampleContext()[@\"edible\"];\n      [dolphin eat:edible];\n      expect(dolphin.isHappy).to(beTruthy())\n    }\n  });\n}\n\nQuickConfigurationEnd\n\nQuickSpecBegin(MackerelSpec)\n\n__block Mackerel *mackerel = nil;\nbeforeEach(^{\n  mackerel = [[Mackerel alloc] init];\n});\n\nitBehavesLike(@\"someting edible\", ^{ return @{ @\"edible\": mackerel }; });\n\nQuickSpecEnd\n\nQuickSpecBegin(CodSpec)\n\n__block Mackerel *cod = nil;\nbeforeEach(^{\n  cod = [[Cod alloc] init];\n});\n\nitBehavesLike(@\"someting edible\", ^{ return @{ @\"edible\": cod }; });\n\nQuickSpecEnd\n```\n\nShared examples can include any number of `it`, `context`, and\n`describe` blocks. They save a *lot* of typing when running\nthe same tests against several different kinds of objects.\n\nIn some cases, you won't need any additional context. In Swift, you can\nsimply use `sharedExampleFor` closures that take no parameters. This\nmight be useful when testing some sort of global state:\n\n```swift\n// Swift\n\nimport Quick\n\nsharedExamplesFor(\"everything under the sea\") {\n  // ...\n}\n\nitBehavesLike(\"everything under the sea\")\n```\n\n\u003e In Objective-C, you'll have to pass a block that takes a\n  `QCKDSLSharedExampleContext`, even if you don't plan on using that\n  argument. Sorry, but that's the way the cookie crumbles!\n  :cookie: :bomb:\n\n## Using Quick in Objective-C: The Optional Shorthand Syntax\n\nQuick works equally well in both Swift and Objective-C.\n\nImporting Quick in an Objective-C file defines macros named `it` and\n`itShouldBehaveLike`, as well as functions like `context()`, `describe()`, etc.\nIf the project you are testing also defines symbols with these names, you may\nencounter confusing build failures. In that case, you can avoid namespace\ncollision by turning off Quick's optional \"shorthand\" syntax:\n\n```objc\n#define QUICK_DISABLE_SHORT_SYNTAX 1\n\n#import \u003cQuick/Quick.h\u003e\n\nQuickSpecBegin(DolphinSpec)\n// ...\nQuickSpecEnd\n```\n\nYou must define the `QUICK_DISABLE_SHORT_SYNTAX` macro *before*\nimporting the Quick header.\n\n## Nimble: Assertions Using `expect(...).to`\n\nQuick provides an easy language to define examples and example groups. Within those\nexamples, [Nimble](https://github.com/Quick/Nimble) provides a simple\nlanguage to define expectations--that is, to assert that code behaves a\ncertain way, and to display a test failure if it doesn't.\n\nNimble expectations use the `expect(...).to` syntax:\n\n```swift\n// Swift\n\nimport Nimble\n\nexpect(person.greeting).to(equal(\"Oh, hi.\"))\nexpect(person.greeting).notTo(equal(\"Hello!\"))\nexpect(person.isHappy).toEventually(beTruthy())\n```\n\n```objc\n// Objective-C\n\n#import \u003cNimble/Nimble.h\u003e\n\nexpect(person.greeting).to(equal(@\"Oh, hi.\"));\nexpect(person.greeting).notTo(equal(@\"Hello!\"));\nexpect(@(person.isHappy)).toEventually(beTruthy());\n```\n\nYou can find much more detailed documentation on\n[Nimble](https://github.com/Quick/Nimble), including a\nfull set of available matchers and details on how to perform asynchronous tests,\nin [the project's README](https://github.com/Quick/Nimble).\n\n## Testing UIKit with Quick\n\nQuick can be used for testing UIKit interaction as well. Say, for example, we have a `DolphinTableViewController` that displays one cell with label `Bottlenose`. We want to test that the cell gets displayed when the view is loaded. Additionally, we would like to delete the row upon selecting it. An approach might be:\n\n```swift\n// Swift\n\nimport UIKit\nimport Quick\nimport Nimble\n\nclass DolphinTableViewControllerSpecs: QuickSpec {\n  override func spec() {\n    var viewController: DolphinTableViewController!\n\n    beforeEach {\n      viewController = DolphinTableViewController()\n    }\n\n    describe(\"viewDidLoad\") {\n      beforeEach {\n        // Accessing the view property causes the UIKit framework to trigger the necessary methods to render the view.\n        viewController.view\n      }\n\n\n      it(\"loads the table view with one cell\") {\n        let tableView = viewController.tableView\n\n        var indexPath = NSIndexPath(forRow: 0, inSection: 0)\n        var cell = viewController.tableView(tableView, cellForRowAtIndexPath: indexPath)\n\n        expect(cell.textLabel?.text).to(equal(\"Bottlenose\"))\n      }\n    }\n\n    describe(\"didSelectRowAtIndexPath\") {\n      beforeEach {\n        // Causes the UIKit framework to trigger the necessary methods to render the view and perform viewWillAppear: and viewDidAppear: callbacks\n        viewController.beginAppearanceTransition(true, animated: false)\n        viewController.endAppearanceTransition()\n      }\n\n      it(\"deletes the selected row and reloads the tableView's data\") {\n        let tableView = viewController.tableView\n        let indexPath = NSIndexPath(forRow: 0, inSection: 0)\n\n        viewController.tableView(tableView, didSelectRowAtIndexPath: indexPath)\n\n        var cell = viewController.tableView(tableView, cellForRowAtIndexPath: indexPath)\n        expect(cell.textLabel?.text).to(beNil())\n      }\n    }\n  }\n}\n```\n\n```objc\n// Objective-C\n\n#import \u003cUIKit/UIKit.h\u003e\n#import \u003cQuick/Quick.h\u003e\n#import \u003cNimble/Nimble.h\u003e\n\nQuickSpecBegin(DolphinTableViewControllerSpec)\n\ndescribe(@\"viewDidLoad\") {\n  __block DolphinTableViewController *viewController = nil;\n\n  beforeEach(^{\n    viewController = [[DolphinTableViewController alloc] init];\n  });\n\n  it(@\"loads the table view with three types of dolphin\", ^{\n    beforeEach(^{\n      // Accessing the view property causes the UIKit framework to trigger the necessary methods to render the view.\n      [viewController view];\n    });\n\n    UITableView *tableView = [viewController tableView];\n    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];\n    UITableViewCell *cell = [viewController tableView:tableView cellForRowAtIndexPath:indexPath];\n\n    expect(@([[cell textLabel] text])).to(equal(@\"Bottlenose\"));\n  });\n}\n\ndescribe(@\"didSelectRowAtIndexPath\") {\n  __block DolphinTableViewController *viewController = nil;\n\n  beforeEach(^{\n    // Causes the UIKit framework to trigger the necessary methods to render the view and perform viewWillAppear: and \n    viewController = [[DolphinTableViewController alloc] init];\n    [viewController beginAppearanceTransition:YES animated:NO];\n    [viewController endAppearanceTransition];\n   });\n\n  it(@\"deletes the selected row and reloads the tableView's data\", ^{\n    UITableView *tableView = [viewController tableView];\n    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];\n\n    [viewController tableView:tableView didSelectRowAtIndexPath:indexPath];\n\n    UITableViewCell *cell = [viewController tableView:tableView cellForRowAtIndexPath:indexPath];\n\n    expect(@([[cell textLabel] text])).to(beNil());\n  });\n}\n\nQuickSpecEnd\n```\n\n## How to Install Quick\n\n\u003e This module is beta software, it currently supports Xcode 6 Beta 4.\n\nQuick provides the syntax to define examples and example groups. Nimble\nprovides the `expect(...).to` assertion syntax. You may use either one,\nor both, in your tests.\n\nTo use Quick and Nimble to test your iOS or OS X applications, follow these 4 easy steps:\n\n1. [Clone the Quick and Nimble repositories](#1-clone-the-quick-and-nimble-repositories)\n2. [Add `Quick.xcodeproj` and `Nimble.xcodeproj` to your test target](#2-add-quickxcodeproj-and-nimblexcodeproj-to-your-test-target)\n3. [Link `Quick.framework` and `Nimble.framework`](#3-link-quickframework-and-nimbleframework)\n4. Start writing specs!\n\nExample projects with this complete setup is available in the\n[`Examples`](https://github.com/modocache/Quick/tree/master/Examples) directory.\n\n### 1. Clone the Quick and Nimble repositories\n\n```sh\ngit clone git@github.com:Quick/Quick.git Vendor/Quick\ngit clone git@github.com:Quick/Nimble.git Vendor/Nimble\n```\n\n### 2. Add `Quick.xcodeproj` and `Nimble.xcodeproj` to your test target\n\nRight-click on the group containing your application's tests and\nselect `Add Files To YourApp...`.\n\n![](http://cl.ly/image/3m110l2s0a18/Screen%20Shot%202014-06-08%20at%204.25.59%20AM.png)\n\nNext, select `Quick.xcodeproj`, which you downloaded in step 1.\n\n![](http://cl.ly/image/431F041z3g1P/Screen%20Shot%202014-06-08%20at%204.26.49%20AM.png)\n\nOnce you've added the Quick project, you should see it in Xcode's project\nnavigator, grouped with your tests.\n\n![](http://cl.ly/image/0p0k2F2u2O3I/Screen%20Shot%202014-06-08%20at%204.27.29%20AM%20copy.png)\n\nFollow the same steps for `Nimble.xcodeproj`.\n\n### 3. Link `Quick.framework` and `Nimble.framework`\n\n Link the `Quick.framework` during your test target's\n`Link Binary with Libraries` build phase. You should see two\n`Quick.frameworks`; one is for OS X, and the other is for iOS.\n\n![](http://cl.ly/image/2L0G0H1a173C/Screen%20Shot%202014-06-08%20at%204.27.48%20AM.png)\n\nDo the same for the `Nimble.framework`.\n\n### 4. Start writing specs!\n\nIf you run into any problems, please file an issue.\n\n## Including Quick in a Git Repository Using Submodules\n\nThe best way to include Quick in a Git repository is by using Git\nsubmodules. Git submodules are great because:\n\n1. They track exactly which version of Quick is being used\n2. It's easy to update Quick to the latest--or any other--version\n\n### Adding Quick as a Git Submodule\n\nTo use Git submodules, follow the same steps as above, except instead of\ncloning the Quick and Nimble repositories, add them to your project as\nsubmodules:\n\n```sh\nmkdir Vendor # you can keep your submodules in their own directory\ngit submodule add git@github.com:Quick/Quick.git Vendor/Quick\ngit submodule add git@github.com:Quick/Nimble.git Vendor/Nimble\ngit submodule update --init --recursive\n```\n\n### Updating the Quick Submodule\n\nIf you ever want to update the Quick submodule to latest version, enter\nthe Quick directory and pull from the master repository:\n\n```sh\ncd Vendor/Quick\ngit pull --rebase origin master\n```\n\nYour Git repository will track changes to submodules. You'll want to\ncommit the fact that you've updated the Quick submodule:\n\n```sh\ngit commit -m \"Updated Quick submodule\"\n```\n\n### Cloning a Repository that Includes a Quick Submodule\n\nAfter other people clone your repository, they'll have to pull down the\nsubmodules as well. They can do so by running the `git submodule update`\ncommand:\n\n```sh\ngit submodule update --init --recursive\n```\n\nYou can read more about Git submodules\n[here](http://git-scm.com/book/en/Git-Tools-Submodules). To see examples\nof Git submodules in action, check out any of the repositories linked to\nin the [\"Who Uses Quick\"](#who-uses-quick) section of this guide.\n\n## How to Install Quick File Templates\n\nThe Quick repository includes file templates for both Swift and\nObjective-C specs.\n\n### Using Alcatraz\n\nQuick templates can be installed via [Alcatraz](https://github.com/supermarin/Alcatraz),\na package manager for Xcode. Just search for the templates from the\nPackage Manager window.\n\n![](http://f.cl.ly/items/3T3q0G1j0b2t1V0M0T04/Screen%20Shot%202014-06-27%20at%202.01.10%20PM.png)\n\n### Manually via the Rakefile\n\nTo manually install the templates, just clone the repository and\nrun the `templates:install` rake task:\n\n```sh\n$ git clone git@github.com:Quick/Quick.git\n$ rake templates:install\n```\n\nUninstalling is easy, too:\n\n```sh\n$ rake templates:uninstall\n```\n\n## Who Uses Quick\n\nQuick is used by many companies, open-source projects, and individuals,\nincluding [GitHub](https://github.com/github) and\n[ReactiveCocoa](https://github.com/ReactiveCocoa). See examples below:\n\n- https://github.com/ReactiveCocoa/ReactiveCocoa\n- https://github.com/github/Archimedes\n- https://github.com/libgit2/objective-git\n- https://github.com/jspahrsummers/RXSwift\n- https://github.com/artsy/eidolon\n- https://github.com/AshFurrow/Moya\n- https://github.com/nerdyc/Squeal\n- https://github.com/pepibumur/SugarRecord\n\n\u003e Add an issue or [tweet](https://twitter.com/modocache) if you'd like to be added to this list.\n\n## License\n\nApache 2.0 license. See the `LICENSE` file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fquick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fquick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fquick/lists"}