For anyone curious: Behavior-Driven Development (BDD) is a business logic alternative to Test-Driven Development (TDD). It uses more of a conversational tone to spell out tests, so you write what you would like the app to do rather than sitting there scratching your head trying to figure out which tests to write. So it places emphasis on the "what" you want the program to do, and fill in the "how" behind the scenes. You can actually write all of your BDD gherkin and test fly your app with known inputs and outputs and then add the logic for arbitrary input and output later. Here is an example implementation for PHP:<p><a href="http://codeception.com" rel="nofollow">http://codeception.com</a>
I wouldn't call this a BDD framework yet. It's speckled with both standard assertions and semantic assertions, and an "It" function that simply takes a block and a string. I can replicate this with using underscores in my test function names and avoid the complexity. Not trying to be a jerk, but what we should be driving for is something closer to:<p><pre><code> func Describe("The system I want to Test"){
When("I click the red button")
Then("I should see the light turn on")
And("I should see 4 lights")
}
func Step("I click the red button"){
buttons["red"].click
}
func Step("I should see the light turn on"){
lights.on.should().be_true
}
func Step("I should see (\d+) lights"){
lights.count.should().be(4)
}</code></pre>
Typo in the page title of "BDD-style framerwork for swift
<a href="http://railsware.com/blog/2014/07/04/bdd-style-testing-in-swift-with-sleipnir/"" rel="nofollow">http://railsware.com/blog/2014/07/04/bdd-style-testing-in-sw...</a><p>Should be "BDD-style framework for swift
<a href="http://railsware.com/blog/2014/07/04/bdd-style-testing-in-swift-with-sleipnir/"" rel="nofollow">http://railsware.com/blog/2014/07/04/bdd-style-testing-in-sw...</a>