aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/enumerable/slice_before_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/enumerable/slice_before_spec.rb')
-rw-r--r--spec/ruby/core/enumerable/slice_before_spec.rb31
1 files changed, 4 insertions, 27 deletions
diff --git a/spec/ruby/core/enumerable/slice_before_spec.rb b/spec/ruby/core/enumerable/slice_before_spec.rb
index 932d06072a..ad730be245 100644
--- a/spec/ruby/core/enumerable/slice_before_spec.rb
+++ b/spec/ruby/core/enumerable/slice_before_spec.rb
@@ -40,33 +40,10 @@ describe "Enumerable#slice_before" do
end
end
- ruby_version_is ""..."2.3" do
- describe "and an argument" do
- it "calls the block with a copy of that argument" do
- arg = [:foo]
- first = nil
- e = @enum.slice_before(arg) do |i, init|
- init.should == arg
- init.should_not equal(arg)
- first = init
- i == 6 || i == 2
- end
- e.should be_an_instance_of(Enumerator)
- e.to_a.should == [[7], [6, 5, 4, 3], [2, 1]]
- e = @enum.slice_before(arg) do |i, init|
- init.should_not equal(first)
- end
- e.to_a
- end
- end
- end
-
- ruby_version_is "2.3" do
- it "does not accept arguments" do
- lambda {
- @enum.slice_before(1) {}
- }.should raise_error(ArgumentError)
- end
+ it "does not accept arguments" do
+ lambda {
+ @enum.slice_before(1) {}
+ }.should raise_error(ArgumentError)
end
end