describe "Array#each" do it "yields each element to the block" do a = [] x = [1, 2, 3] x.each { |item| a << item }.should == x a.should == [1, 2, 3] end end