Get Updates By E-mail 

Article Written By:
Johann Dowa

An Rspec Inspired Behavior Driven Testing Framework For Swift

  •  
  •  
  •  
  •  
  •  

About a month ago I mentioned a nice utility library for Swift inspired by Underscore.js and Asterism.

Here’s an extensive testing framework for Swift (and Objective-C) with a syntax inspired by Rspec, Specta and Gingko called Quick from Brian Gesiak.

This example from the readme shows the syntax of Quick in action:

import Quick
import Nimble

class TableOfContentsSpec: QuickSpec {
    override func spec() {
        describe("the table of contents below") {
            it("has everything you need to get started") {
                let sections = TableOfContents().sections
                expect(sections).to.contain("Quick Core")
                expect(sections).to.contain("Quick Expectations")
                expect(sections).to.contain("How to Install Quick")
            }

<pre><code>        context("if it doesn't have what you're looking for") {
            it("needs to be updated") {
                let you = You(awesome: true)
                expect{you.submittedAnIssue}.will.beTrue()
            }
        }
    }
}
</code></pre>

}

You can find Quick on Github here.

A very nice behavior driven testing framework.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments