mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@c1b568b
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8a15857a7f
commit
401b64c4e8
3689 changed files with 6095 additions and 6096 deletions
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe "The -c command line option" do
|
||||
it "checks syntax in given file" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe "The -d command line option" do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe "The -e command line option" do
|
||||
it "evaluates the given string" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe "The -r command line option" do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe "The -s command line option" do
|
||||
describe "when using -- to stop parsing" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe 'The -C command line option' do
|
||||
before :all do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe "The -I command line option" do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe 'The -S command line option' do
|
||||
before :each do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/verbose', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
require_relative 'shared/verbose'
|
||||
|
||||
describe "The -W command line option" do
|
||||
before :each do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/verbose', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
require_relative 'shared/verbose'
|
||||
|
||||
describe "The -v command line option" do
|
||||
it_behaves_like :command_line_verbose, "-v"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/verbose', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
require_relative 'shared/verbose'
|
||||
|
||||
describe "The -w command line option" do
|
||||
it_behaves_like :command_line_verbose, "-w"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe "The error message caused by an exception" do
|
||||
it "is not printed to stdout" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
ruby_version_is "2.3" do
|
||||
describe "The --enable-frozen-string-literal flag causes string literals to" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe "Processing RUBYOPT" do
|
||||
before (:each) do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../spec_helper', __FILE__)
|
||||
require_relative '../spec_helper'
|
||||
|
||||
describe "The interpreter" do
|
||||
it "prints an error when given a file with invalid syntax" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF" do
|
||||
it "is extended by the Enumerable module" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.argv" do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.binmode" do
|
||||
before :each do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/each_byte', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/each_byte'
|
||||
|
||||
describe "ARGF.bytes" do
|
||||
it_behaves_like :argf_each_byte, :bytes
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/each_char', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/each_char'
|
||||
|
||||
describe "ARGF.chars" do
|
||||
it_behaves_like :argf_each_char, :chars
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.close" do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.closed?" do
|
||||
before :each do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/each_codepoint', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/each_codepoint'
|
||||
|
||||
describe "ARGF.codepoints" do
|
||||
it_behaves_like :argf_each_codepoint, :codepoints
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/each_byte', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/each_byte'
|
||||
|
||||
describe "ARGF.each_byte" do
|
||||
it_behaves_like :argf_each_byte, :each_byte
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/each_char', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/each_char'
|
||||
|
||||
describe "ARGF.each_char" do
|
||||
it_behaves_like :argf_each_char, :each_char
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/each_codepoint', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/each_codepoint'
|
||||
|
||||
describe "ARGF.each_codepoint" do
|
||||
it_behaves_like :argf_each_codepoint, :each_codepoint
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/each_line', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/each_line'
|
||||
|
||||
describe "ARGF.each_line" do
|
||||
it_behaves_like :argf_each_line, :each_line
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/each_line', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/each_line'
|
||||
|
||||
describe "ARGF.each" do
|
||||
it_behaves_like :argf_each_line, :each
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/eof', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/eof'
|
||||
|
||||
describe "ARGF.eof" do
|
||||
it_behaves_like :argf_eof, :eof
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.file" do
|
||||
before :each do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/filename', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/filename'
|
||||
|
||||
describe "ARGF.filename" do
|
||||
it_behaves_like :argf_filename, :filename
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/fileno', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/fileno'
|
||||
|
||||
describe "ARGF.fileno" do
|
||||
it_behaves_like :argf_fileno, :fileno
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/getc', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/getc'
|
||||
|
||||
describe "ARGF.getc" do
|
||||
it_behaves_like :argf_getc, :getc
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/gets', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/gets'
|
||||
|
||||
describe "ARGF.gets" do
|
||||
it_behaves_like :argf_gets, :gets
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.lineno" do
|
||||
before :each do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/each_line', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/each_line'
|
||||
|
||||
describe "ARGF.lines" do
|
||||
it_behaves_like :argf_each_line, :lines
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/filename', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/filename'
|
||||
|
||||
describe "ARGF.path" do
|
||||
it_behaves_like :argf_filename, :path
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/pos', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/pos'
|
||||
|
||||
describe "ARGF.pos" do
|
||||
it_behaves_like :argf_pos, :pos
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/read', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/read'
|
||||
|
||||
platform_is_not :windows do
|
||||
describe 'ARGF.read_nonblock' do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/read', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/read'
|
||||
|
||||
describe "ARGF.read" do
|
||||
it_behaves_like :argf_read, :read
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/getc', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/getc'
|
||||
|
||||
describe "ARGF.getc" do
|
||||
it_behaves_like :argf_getc, :readchar
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/gets', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/gets'
|
||||
|
||||
describe "ARGF.readline" do
|
||||
it_behaves_like :argf_gets, :readline
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/readlines', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/readlines'
|
||||
|
||||
describe "ARGF.readlines" do
|
||||
it_behaves_like :argf_readlines, :readlines
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/read', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/read'
|
||||
|
||||
describe "ARGF.readpartial" do
|
||||
it_behaves_like :argf_read, :readpartial
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.rewind" do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.seek" do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.set_encoding" do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.skip" do
|
||||
before :each do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/pos', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/pos'
|
||||
|
||||
describe "ARGF.tell" do
|
||||
it_behaves_like :argf_pos, :tell
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/readlines', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/readlines'
|
||||
|
||||
describe "ARGF.to_a" do
|
||||
it_behaves_like :argf_readlines, :to_a
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/fileno', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/fileno'
|
||||
|
||||
describe "ARGF.to_i" do
|
||||
it_behaves_like :argf_fileno, :to_i
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.to_io" do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "ARGF.to_s" do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Array.allocate" do
|
||||
it "returns an instance of Array" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Array#any?" do
|
||||
describe 'with no block given (a default block of { |x| x } is implicit)' do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/push', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/push'
|
||||
|
||||
describe "Array#<<" do
|
||||
it "pushes the object onto the end of the array" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Array" do
|
||||
it "includes Enumerable" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#assoc" do
|
||||
it "returns the first array whose 1st item is == obj or nil" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#at" do
|
||||
it "returns the (n+1)'th element for the passed index n" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../../enumerable/shared/enumeratorized', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative '../enumerable/shared/enumeratorized'
|
||||
|
||||
ruby_version_is "2.3" do
|
||||
describe "Array#bsearch_index" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../../enumerable/shared/enumeratorized', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative '../enumerable/shared/enumeratorized'
|
||||
|
||||
describe "Array#bsearch" do
|
||||
it "returns an Enumerator when not passed a block" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#clear" do
|
||||
it "removes all elements" do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/clone', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/clone'
|
||||
|
||||
describe "Array#clone" do
|
||||
it_behaves_like :array_clone, :clone
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/collect', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/collect'
|
||||
|
||||
describe "Array#collect" do
|
||||
it_behaves_like :array_collect, :collect
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Array#combination" do
|
||||
before :each do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#compact" do
|
||||
it "returns a copy of array with all nil elements removed" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#<=>" do
|
||||
it "calls <=> left to right and return first non-0 result" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#concat" do
|
||||
it "returns the array itself" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array.[]" do
|
||||
it "returns a new array populated with the given elements" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Array#count" do
|
||||
it "returns the number of elements" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../../enumerable/shared/enumeratorized', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative '../enumerable/shared/enumeratorized'
|
||||
|
||||
describe "Array#cycle" do
|
||||
before :each do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#delete_at" do
|
||||
it "removes the element at the specified index" do
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/enumeratorize', __FILE__)
|
||||
require File.expand_path('../shared/delete_if', __FILE__)
|
||||
require File.expand_path('../../enumerable/shared/enumeratorized', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/enumeratorize'
|
||||
require_relative 'shared/delete_if'
|
||||
require_relative '../enumerable/shared/enumeratorized'
|
||||
|
||||
describe "Array#delete_if" do
|
||||
before do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#delete" do
|
||||
it "removes elements that are #== to object" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
ruby_version_is '2.3' do
|
||||
describe "Array#dig" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Array#drop" do
|
||||
it "removes the specified number of elements from the start of the array" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Array#drop_while" do
|
||||
it "removes elements from the start of the array while the block evaluates to true" do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/clone', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/clone'
|
||||
|
||||
describe "Array#dup" do
|
||||
it_behaves_like :array_clone, :dup # FIX: no, clone and dup are not alike
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/enumeratorize', __FILE__)
|
||||
require File.expand_path('../../enumerable/shared/enumeratorized', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/enumeratorize'
|
||||
require_relative '../enumerable/shared/enumeratorized'
|
||||
|
||||
# Modifying a collection while the contents are being iterated
|
||||
# gives undefined behavior. See
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/enumeratorize', __FILE__)
|
||||
require File.expand_path('../../enumerable/shared/enumeratorized', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/enumeratorize'
|
||||
require_relative '../enumerable/shared/enumeratorized'
|
||||
|
||||
# Modifying a collection while the contents are being iterated
|
||||
# gives undefined behavior. See
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/slice', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/slice'
|
||||
|
||||
describe "Array#[]" do
|
||||
it_behaves_like :array_slice, :[]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#[]=" do
|
||||
it "sets the value of the element at index" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#empty?" do
|
||||
it "returns true if the array has no elements" do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/eql', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/eql'
|
||||
|
||||
describe "Array#eql?" do
|
||||
it_behaves_like :array_eql, :eql?
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/eql', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/eql'
|
||||
|
||||
describe "Array#==" do
|
||||
it_behaves_like :array_eql, :==
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#fetch" do
|
||||
it "returns the element at the passed index" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#fill" do
|
||||
before :all do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/select', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/select'
|
||||
|
||||
ruby_version_is "2.6" do
|
||||
describe "Array#filter" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/index', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/index'
|
||||
|
||||
describe "Array#find_index" do
|
||||
it_behaves_like :array_index, :find_index
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#first" do
|
||||
it "returns the first element" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#flatten" do
|
||||
it "returns a one-dimensional flattening recursively" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#frozen?" do
|
||||
it "returns true if array is frozen" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#hash" do
|
||||
it "returns the same fixnum for arrays with the same content" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#include?" do
|
||||
it "returns true if object is present, false otherwise" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/index', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/index'
|
||||
|
||||
describe "Array#index" do
|
||||
it_behaves_like :array_index, :index
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#initialize" do
|
||||
before :each do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#insert" do
|
||||
it "returns self" do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/inspect', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/inspect'
|
||||
|
||||
describe "Array#inspect" do
|
||||
it_behaves_like :array_inspect, :inspect
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#&" do
|
||||
it "creates an array with elements common to both arrays (intersection)" do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/classes', __FILE__)
|
||||
require File.expand_path('../shared/join', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/join'
|
||||
|
||||
describe "Array#join" do
|
||||
it_behaves_like :array_join_with_string_separator, :join
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue