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,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../../../fixtures/basicobject/method_missing', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative '../../fixtures/basicobject/method_missing'
|
||||
|
||||
describe :method_missing_defined_module, shared: true do
|
||||
describe "for a Module with #method_missing defined" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :kernel_Complex, shared: true do
|
||||
describe "when passed [Complex, Complex]" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_abs, shared: true do
|
||||
it "returns the modulus: |a + bi| = sqrt((a ^ 2) + (b ^ 2))" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_abs2, shared: true do
|
||||
it "returns the sum of the squares of the real and imaginary parts" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_coerce, shared: true do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_I, shared: true do
|
||||
it "is Complex(0, 1)" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_denominator, shared: true do
|
||||
it "returns the least common multiple denominator of the real and imaginary parts" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_divide, shared: true do
|
||||
describe "with Complex" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_equal_value, shared: true do
|
||||
describe "with Complex" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_exponent, shared: true do
|
||||
describe "with Fixnum 0" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require_relative '../../../spec_helper'
|
||||
|
||||
describe :float_arg, shared: true do
|
||||
it "returns NaN if NaN" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_image, shared: true do
|
||||
it "returns the imaginary part of self" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_minus, shared: true do
|
||||
describe "with Complex" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_multiply, shared: true do
|
||||
describe "with Complex" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_numerator, shared: true do
|
||||
it "returns self's numerator" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require_relative '../../../spec_helper'
|
||||
|
||||
describe :numeric_arg, shared: true do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require_relative '../../../spec_helper'
|
||||
|
||||
describe :numeric_conj, shared: true do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require_relative '../../../spec_helper'
|
||||
|
||||
describe :numeric_imag, shared: true do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require_relative '../../../spec_helper'
|
||||
|
||||
describe :numeric_polar, shared: true do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require_relative '../../../spec_helper'
|
||||
|
||||
describe :numeric_real, shared: true do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_plus, shared: true do
|
||||
describe "with Complex" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_polar_class, shared: true do
|
||||
it "returns a complex number in terms of radius and angle" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_rect, shared: true do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :complex_to_s, shared: true do
|
||||
describe "when self's real component is 0" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../../../fixtures/enumerator/classes', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative '../../fixtures/enumerator/classes'
|
||||
|
||||
describe :enum_cons, shared: true do
|
||||
it "returns an enumerator of the receiver with iteration of each_cons for each array of n concecutive elements" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :enum_new, shared: true do
|
||||
it "creates a new custom enumerator with the given object, iterator and arguments" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :enum_next, shared: true do
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :enum_rewind, shared: true do
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :enum_with_index, shared: true do
|
||||
|
||||
require File.expand_path('../../../fixtures/enumerator/classes', __FILE__)
|
||||
require_relative '../../fixtures/enumerator/classes'
|
||||
|
||||
before :each do
|
||||
@enum = [1, 2, 3, 4].to_enum
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :enum_with_object, shared: true do
|
||||
before :each do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :file_world_readable, shared: true do
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :file_world_writable, shared: true do
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../../../fixtures/rational', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative '../../fixtures/rational'
|
||||
|
||||
describe :kernel_Rational, shared: true do
|
||||
describe "passed Integer" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_abs, shared: true do
|
||||
it "returns self's absolute value" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../fixtures/rational', __FILE__)
|
||||
require_relative '../../fixtures/rational'
|
||||
|
||||
describe :rational_arithmetic_exception_in_coerce, shared: true do
|
||||
ruby_version_is ""..."2.5" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_ceil, shared: true do
|
||||
before do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_coerce, shared: true do
|
||||
it "returns the passed argument, self as Float, when given a Float" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../../../fixtures/rational', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative '../../fixtures/rational'
|
||||
|
||||
describe :rational_cmp_rat, shared: true do
|
||||
it "returns 1 when self is greater than the passed argument" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_denominator, shared: true do
|
||||
it "returns the denominator" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_div_rat, shared: true do
|
||||
it "performs integer division and returns the result" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_divide_rat, shared: true do
|
||||
it "returns self divided by other as a Rational" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_divmod_rat, shared: true do
|
||||
it "returns the quotient as Integer and the remainder as Rational" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_equal_value_rat, shared: true do
|
||||
it "returns true if self has the same numerator and denominator as the passed argument" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_exponent, shared: true do
|
||||
describe "when passed Rational" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_fdiv, shared: true do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_floor, shared: true do
|
||||
before do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_hash, shared: true do
|
||||
# BUG: Rational(2, 3).hash == Rational(3, 2).hash
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_inspect, shared: true do
|
||||
conflicts_with :Prime do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_marshal_dump, shared: true do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_marshal_load, shared: true do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_minus_rat, shared: true do
|
||||
it "returns the result of subtracting other from self as a Rational" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_modulo, shared: true do
|
||||
it "returns the remainder when this value is divided by other" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_multiply_rat, shared: true do
|
||||
it "returns self divided by other as a Rational" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_numerator, shared: true do
|
||||
it "returns the numerator" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_plus_rat, shared: true do
|
||||
it "returns the result of subtracting other from self as a Rational" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_quo, shared: true do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_remainder, shared: true do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_round, shared: true do
|
||||
before do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_to_f, shared: true do
|
||||
it "returns self converted to a Float" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_to_i, shared: true do
|
||||
it "converts self to an Integer by truncation" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_to_r, shared: true do
|
||||
conflicts_with :Prime do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_to_s, shared: true do
|
||||
it "returns a string representation of self" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe :rational_truncate, shared: true do
|
||||
before do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue