-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
I have a scope that I want to take the first element from, then iterate over the rest of its contents.
I would expect calling #shift would return the current element and skip to the next one in the collection, but it does not skip to the next element.
describe "#shift" do
- PASSES
it "returns the current value" do
@person.addresses.criteria.shift.number.should == 1
end
- FAILS
it "skips to the next value" do
@person.addresses.criteria.shift
@person.addresses.criteria.first.number.should == 2
end
end