aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/library/prime/shared/next.rb
blob: f79b2c051ece31056461da38949b0e804a61d6ff (plain)
1
2
3
4
5
6
7
8
describe :prime_next, shared: true do
  it "returns the element at the current position and moves forward" do
    p = Prime.instance.each
    p.next.should == 2
    p.next.should == 3
    p.next.next.should == 6
  end
end