Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Created May 23, 2019 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chelseatroy/64e108435949f75b41ff0b18370e9507 to your computer and use it in GitHub Desktop.
Save chelseatroy/64e108435949f75b41ff0b18370e9507 to your computer and use it in GitHub Desktop.
Count Tests
...
def test_count_happy_path
db = Database.new
db.set "Snowy", "Owl"
assert_equal(1, db.count("Owl"))
db.set "GreatHorned", "Owl"
assert_equal(2, db.count("Owl"))
end
def test_count_no_value
db = Database.new
assert_equal(0, db.count("NoKey"))
end
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment