From the course: Ruby: Testing with RSpec
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Restaurant - Ruby Tutorial
From the course: Ruby: Testing with RSpec
Challenge: Restaurant
- Our next challenge is to try to write the specs for our Restaurant class. Make no mistake about it, this is going to be harder than the last two challenges that we've tried. In this challenge, we're going to be making use of a few more concepts. You're going to see the use of let, subject, whether explicitly defined or implicitly defined, pending, and we're going to make use of the helper method, no_output. You'll recall that we added that to our other project when we talked about helpers. Well, it's going to show up in this project as well. All together, there are 22 pending examples that you need to work on, and I would estimate that it's going to take you approximately 45 minutes to an hour to complete. Let's take a look at the code, so we can see the work that's ahead. So here I am in the actual Restaurant class itself. The first place to start, I think, is to look at that code, and see the scope of what we need to write tests for. We have this attribute accessor here, for the…
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.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Food-finder application6m 8s
-
(Locked)
Challenge: NumberHelper5m 49s
-
(Locked)
Solution: NumberHelper3m 8s
-
(Locked)
Challenge: StringExtend2m 6s
-
(Locked)
Solution: StringExtend3m 48s
-
(Locked)
Challenge: Restaurant5m 25s
-
(Locked)
Solution: Restaurant6m 30s
-
(Locked)
Challenge: Guide12m 49s
-
(Locked)
Solution: Guide6m 41s
-
(Locked)
-
-
-
-