Send an e-mail to adamjamesleonard@gmail.com with your e-mail address.
BDD was developed by Dan North as a response to the issues he encountered when teaching Test-driven development.
Dan North created the first BDD framework, JBehave. Then he created a story-level BDD framework, RBehave. Which then got integrated in to ???
is a BDD (Behavior-driven development) testing framework for Swift and Objective-C.
is a Matcher framework for Swift.
We will be building a simple Bank Account.
Our Bank Account will have the following functionality
Describe allows us to wrap a set of tests against one bit of functionality.
In our case, our method #withdrawal.
We use # to indicate an instance methods name.
We use . when indicating a class methods name.
This is a style from Ruby/RSpec best practices.
We use context to specify conditional behavior
with positive balance.
with negative balance.
Move the fee applying functionality to it's own method.
This allows us to give this bit of functionality a name.
Text
We can share setup code with beforeEach
There's also afterEach (runs after each test), afterSuite, and beforeSuite.
Follow @adamjleonard
http://www.adamjleonard.com
Subscribe to
http://www.swifcast.tv
Add Swift libraries to
http://www.swifttoolbox.io
Check out the company I work for!
http://www.happyfuncorp.com