Created
February 14, 2010 19:42
-
-
Save kronos/304212 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/spec/ruby/core/array/shift_spec.rb b/spec/ruby/core/array/shift_spec.rb | |
index 1c9b773..9311cf8 100644 | |
--- a/spec/ruby/core/array/shift_spec.rb | |
+++ b/spec/ruby/core/array/shift_spec.rb | |
@@ -143,4 +143,12 @@ describe "Array#shift" do | |
end | |
end | |
end | |
+ | |
+ it "and shift(n) should work correct together" do | |
+ a = [1, 2, 3, 4, 5] | |
+ | |
+ a.shift.should == 1 | |
+ a.shift(3).should == [2, 3, 4] | |
+ a.should == [5] | |
+ end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment