mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@ccf0d85
This commit is contained in:
parent
afcbb501ac
commit
b9f34062f0
28 changed files with 692 additions and 31 deletions
|
@ -89,5 +89,19 @@ describe :enumerable_collect, shared: true do
|
|||
end.should raise_error(ArgumentError)
|
||||
end
|
||||
|
||||
it "calls the each method on sub-classes" do
|
||||
c = Class.new(Hash) do
|
||||
def each
|
||||
ScratchPad << 'in each'
|
||||
super
|
||||
end
|
||||
end
|
||||
h = c.new
|
||||
h[1] = 'a'
|
||||
ScratchPad.record []
|
||||
h.send(@method) { |k,v| v }
|
||||
ScratchPad.recorded.should == ['in each']
|
||||
end
|
||||
|
||||
it_should_behave_like :enumerable_enumeratorized_with_origin_size
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue