forked from thoughtpunch/geolocater
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using rspec's let feature to great effect.
Two changes here: the first is to use an awesome feature of rspec: let. Basically, we can let rspec instantiate our object, which gets all of that typing of long class names out of the way. It also lets our tests focus on what's important, and ignore what isn't. Read the tests now: "When the ip is this, I expect the locator to do that." The second thing was breaking the last test into two. I wanted to do this as a separate step, but it didn't work until I made the change: you really had two assertions in that last one. It deserves its own test.
- Loading branch information
1 parent
8feb700
commit 664ec18
Showing
1 changed file
with
19 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters