Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #17 from dzjuck/cache_values_spec
Browse files Browse the repository at this point in the history
Add Cache#values spec
  • Loading branch information
jdantonio committed Apr 28, 2015
2 parents b0cd464 + 63bec51 commit bd43a62
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/thread_safe/cache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,16 @@ def key # assert_collision_resistance expects to be able to call .key to get the
expect([1, 2]).to eq @cache.keys.sort
end

it '#values' do
expect([]).to eq @cache.values

@cache[1] = 1
expect([1]).to eq @cache.values

@cache[2] = 2
expect([1, 2]).to eq @cache.values.sort
end

it '#each_key' do
expect(@cache).to eq @cache.each_key { flunk }

Expand Down

0 comments on commit bd43a62

Please sign in to comment.