From the course: Behavior-Driven Development
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Objectify the application - Cucumber Tutorial
From the course: Behavior-Driven Development
Objectify the application
- [Instructor] We're at the point in the development of our application where we have our first failing test, which is great. You should be very skeptical of any test that you haven't seen fail. Now that we know that cucumber is able to detect errors in our application, we're ready to write the code that makes our test succeed. We see that we expected our process payment method to include true when it runs. Taking a look at this method inside of our caffeinate application. Inside of the associate class, I can just cheat in order to return this value. Do you see how? I'll add a set of brackets and return true. Saving and rerunning cucumber, our test passes. This isn't really a solution that's built for the future though, is it? This is the process though. Now we can refactor and as we go we constantly run our tests ensuring that we haven't strayed away from the desired state that proves our application works. We can map this out a little further just to get that warm and fuzzy feeling…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.