summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/shared/index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/array/shared/index.rb')
-rw-r--r--spec/ruby/core/array/shared/index.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/ruby/core/array/shared/index.rb b/spec/ruby/core/array/shared/index.rb
index a9896554f2..cc6d6cfb5b 100644
--- a/spec/ruby/core/array/shared/index.rb
+++ b/spec/ruby/core/array/shared/index.rb
@@ -1,3 +1,5 @@
+require_relative '../shared/iterable_and_tolerating_size_increasing'
+
describe :array_index, shared: true do
it "returns the index of the first element == to object" do
x = mock('3')
@@ -31,7 +33,9 @@ describe :array_index, shared: true do
describe "given no argument and no block" do
it "produces an Enumerator" do
- [].send(@method).should be_an_instance_of(Enumerator)
+ [].send(@method).should.instance_of?(Enumerator)
end
end
+
+ it_should_behave_like :array_iterable_and_tolerating_size_increasing
end