diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 20:18:52 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 20:18:52 +0000 |
commit | 1d15d5f08032acf1b7bceacbb450d617ff6e0931 (patch) | |
tree | a3785a79899302bc149e4a6e72f624ac27dc1f10 /spec/rubyspec/core/enumerator/next_values_spec.rb | |
parent | 75bfc6440d595bf339007f4fb280fd4d743e89c1 (diff) |
Move spec/rubyspec to spec/ruby for consistency
* Other ruby implementations use the spec/ruby directory.
[Misc #13792] [ruby-core:82287]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/rubyspec/core/enumerator/next_values_spec.rb')
-rw-r--r-- | spec/rubyspec/core/enumerator/next_values_spec.rb | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/spec/rubyspec/core/enumerator/next_values_spec.rb b/spec/rubyspec/core/enumerator/next_values_spec.rb deleted file mode 100644 index 2c4b23dc8d..0000000000 --- a/spec/rubyspec/core/enumerator/next_values_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -require File.expand_path('../../../spec_helper', __FILE__) - -describe "Enumerator#next_values" do - before :each do - o = Object.new - def o.each - yield :a - yield :b1, :b2 - yield :c - yield :d1, :d2 - yield :e1, :e2, :e3 - yield nil - yield - end - - @e = o.to_enum - end - - it "returns the next element in self" do - @e.next_values.should == [:a] - end - - it "advances the position of the current element" do - @e.next.should == :a - @e.next_values.should == [:b1, :b2] - @e.next.should == :c - end - - it "advances the position of the enumerator each time when called multiple times" do - 2.times { @e.next_values } - @e.next_values.should == [:c] - @e.next.should == [:d1, :d2] - end - - it "works in concert with #rewind" do - 2.times { @e.next } - @e.rewind - @e.next_values.should == [:a] - end - - it "returns an array with only nil if yield is called with nil" do - 5.times { @e.next } - @e.next_values.should == [nil] - end - - it "returns an empty array if yield is called without arguments" do - 6.times { @e.next } - @e.next_values.should == [] - end - - it "raises StopIteration if called on a finished enumerator" do - 7.times { @e.next } - lambda { @e.next_values }.should raise_error(StopIteration) - end -end |