summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/slice_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/slice_spec.rb')
-rw-r--r--spec/ruby/core/string/slice_spec.rb33
1 files changed, 3 insertions, 30 deletions
diff --git a/spec/ruby/core/string/slice_spec.rb b/spec/ruby/core/string/slice_spec.rb
index 14e2251b3f..16d7665bbf 100644
--- a/spec/ruby/core/string/slice_spec.rb
+++ b/spec/ruby/core/string/slice_spec.rb
@@ -1,39 +1,12 @@
-# -*- encoding: utf-8 -*-
# frozen_string_literal: false
require_relative '../../spec_helper'
require_relative 'fixtures/classes'
require_relative 'shared/slice'
describe "String#slice" do
- it_behaves_like :string_slice, :slice
-end
-
-describe "String#slice with index, length" do
- it_behaves_like :string_slice_index_length, :slice
-end
-
-describe "String#slice with Range" do
- it_behaves_like :string_slice_range, :slice
-end
-
-describe "String#slice with Regexp" do
- it_behaves_like :string_slice_regexp, :slice
-end
-
-describe "String#slice with Regexp, index" do
- it_behaves_like :string_slice_regexp_index, :slice
-end
-
-describe "String#slice with Regexp, group" do
- it_behaves_like :string_slice_regexp_group, :slice
-end
-
-describe "String#slice with String" do
- it_behaves_like :string_slice_string, :slice
-end
-
-describe "String#slice with Symbol" do
- it_behaves_like :string_slice_symbol, :slice
+ it "is an alias of String#[]" do
+ String.instance_method(:slice).should == String.instance_method(:[])
+ end
end
describe "String#slice! with index" do