- [Narrator] Cucumber is telling us that we need…to create a Customer class…and an Associate class that define…what's going to happen when each…of these objects are used inside of our step definitions.…We'll start by creating a lib directory…within the Caffeinate project hierarchy.…Inside of lib, I'll create a new file…called caffeinate.rb.…Within this file, we'll scaffold out the bare minimum…to satisfy the API that our Customer…and Associate classes exist.…
I'll type class Customer,…making sure I'm matching the case.…Within this class, I'll type a definition…for the orders method,…ending this statement and then ending the Customer class.…We'll also create an Associate class while we're at it,…typing class Associate.…And we'll define a method for Associate for later on.…For now I'll simply create the class…making sure to end the class statement and save this file.…
To execute this right away,…I'll open up the step definitions, steps.rb file.…At the top I'll use the require statement.…I'll require the caffeinate application…
Released
8/17/2018- What is behavior-driven development?
- Agile and BDD
- BDD examples
- BDD frameworks
- Defining scenarios
- Domain modeling
- Enforcing object-oriented design
- BDD process: Behavior before function
Share this video
Embed this video
Video: Embracing failure