Skip to content

Commit

Permalink
Use real node for Container#each test
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzedge committed Feb 17, 2018
1 parent 9c645e6 commit f4a1d08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,7 @@

## 1.0.3 [compare][compare_v1_0_2_and_master]

- Use real node for `Container#each` test by [@gonzedge][github_user_gonzedge]
- Define `ProviderCollection#format` method instead of alias for `#keys` by [@gonzedge][github_user_gonzedge]
- Add documentation for `ProviderCollection`'s `#keys` and `#[]` by [@gonzedge][github_user_gonzedge]
- Upgrade to coveralls 0.8.21 by [@gonzedge][github_user_gonzedge]
Expand Down
6 changes: 2 additions & 4 deletions spec/lib/rambling/trie/container_spec.rb
Expand Up @@ -548,17 +548,15 @@

describe '#each' do
before do
allow(root).to receive :each
root.add %i(s e y)
end

it 'returns an enumerator when no block is given' do
expect(container.each).to be_instance_of Enumerator
expect(root).not_to have_received :each
end

it 'delegates `#each` to the root node when a block is given' do
container.each { |_| }
expect(root).to have_received :each
expect(container.each.to_a).to eq %w(yes)
end
end

Expand Down

0 comments on commit f4a1d08

Please sign in to comment.