mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@83063a3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1e658d45e1
commit
3fa5bd38af
494 changed files with 4133 additions and 3109 deletions
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/abs', __FILE__)
|
||||
|
||||
describe "Rational#abs" do
|
||||
it_behaves_like(:rational_abs, :abs)
|
||||
it_behaves_like :rational_abs, :abs
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/ceil', __FILE__)
|
||||
|
||||
describe "Rational#ceil" do
|
||||
it_behaves_like(:rational_ceil, :ceil)
|
||||
it_behaves_like :rational_ceil, :ceil
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/coerce', __FILE__)
|
||||
|
||||
describe "Rational#coerce" do
|
||||
it_behaves_like(:rational_coerce, :coerce)
|
||||
it_behaves_like :rational_coerce, :coerce
|
||||
end
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
require File.expand_path('../../../shared/rational/comparison', __FILE__)
|
||||
|
||||
describe "Rational#<=> when passed a Rational object" do
|
||||
it_behaves_like(:rational_cmp_rat, :<=>)
|
||||
it_behaves_like :rational_cmp_rat, :<=>
|
||||
end
|
||||
|
||||
describe "Rational#<=> when passed a Integer object" do
|
||||
it_behaves_like(:rational_cmp_int, :<=>)
|
||||
it_behaves_like :rational_cmp_int, :<=>
|
||||
end
|
||||
|
||||
describe "Rational#<=> when passed a Float object" do
|
||||
it_behaves_like(:rational_cmp_float, :<=>)
|
||||
it_behaves_like :rational_cmp_float, :<=>
|
||||
end
|
||||
|
||||
describe "Rational#<=> when passed an Object that responds to #coerce" do
|
||||
it_behaves_like(:rational_cmp_coerce, :<=>)
|
||||
it_behaves_like(:rational_cmp_coerce_exception, :<=>)
|
||||
it_behaves_like :rational_cmp_coerce, :<=>
|
||||
it_behaves_like :rational_cmp_coerce_exception, :<=>
|
||||
end
|
||||
|
||||
describe "Rational#<=> when passed a non-Numeric Object that doesn't respond to #coerce" do
|
||||
it_behaves_like(:rational_cmp_other, :<=>)
|
||||
it_behaves_like :rational_cmp_other, :<=>
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/denominator', __FILE__)
|
||||
|
||||
describe "Rational#denominator" do
|
||||
it_behaves_like(:rational_denominator, :denominator)
|
||||
it_behaves_like :rational_denominator, :denominator
|
||||
end
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
require File.expand_path('../../../shared/rational/div', __FILE__)
|
||||
|
||||
describe "Rational#div" do
|
||||
it_behaves_like(:rational_div, :div)
|
||||
it_behaves_like :rational_div, :div
|
||||
end
|
||||
|
||||
describe "Rational#div passed a Rational" do
|
||||
it_behaves_like(:rational_div_rat, :div)
|
||||
it_behaves_like :rational_div_rat, :div
|
||||
end
|
||||
|
||||
describe "Rational#div passed an Integer" do
|
||||
it_behaves_like(:rational_div_int, :div)
|
||||
it_behaves_like :rational_div_int, :div
|
||||
end
|
||||
|
||||
describe "Rational#div passed a Float" do
|
||||
it_behaves_like(:rational_div_float, :div)
|
||||
it_behaves_like :rational_div_float, :div
|
||||
end
|
||||
|
|
|
@ -2,18 +2,18 @@ require File.expand_path('../../../shared/rational/divide', __FILE__)
|
|||
require File.expand_path('../../../shared/rational/arithmetic_exception_in_coerce', __FILE__)
|
||||
|
||||
describe "Rational#/" do
|
||||
it_behaves_like(:rational_divide, :/)
|
||||
it_behaves_like :rational_divide, :/
|
||||
it_behaves_like :rational_arithmetic_exception_in_coerce, :/
|
||||
end
|
||||
|
||||
describe "Rational#/ when passed an Integer" do
|
||||
it_behaves_like(:rational_divide_int, :/)
|
||||
it_behaves_like :rational_divide_int, :/
|
||||
end
|
||||
|
||||
describe "Rational#/ when passed a Rational" do
|
||||
it_behaves_like(:rational_divide_rat, :/)
|
||||
it_behaves_like :rational_divide_rat, :/
|
||||
end
|
||||
|
||||
describe "Rational#/ when passed a Float" do
|
||||
it_behaves_like(:rational_divide_float, :/)
|
||||
it_behaves_like :rational_divide_float, :/
|
||||
end
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
require File.expand_path('../../../shared/rational/divmod', __FILE__)
|
||||
|
||||
describe "Rational#divmod when passed a Rational" do
|
||||
it_behaves_like(:rational_divmod_rat, :divmod)
|
||||
it_behaves_like :rational_divmod_rat, :divmod
|
||||
end
|
||||
|
||||
describe "Rational#divmod when passed an Integer" do
|
||||
it_behaves_like(:rational_divmod_int, :divmod)
|
||||
it_behaves_like :rational_divmod_int, :divmod
|
||||
end
|
||||
|
||||
describe "Rational#divmod when passed a Float" do
|
||||
it_behaves_like(:rational_divmod_float, :divmod)
|
||||
it_behaves_like :rational_divmod_float, :divmod
|
||||
end
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
require File.expand_path('../../../shared/rational/equal_value', __FILE__)
|
||||
|
||||
describe "Rational#==" do
|
||||
it_behaves_like(:rational_equal_value, :==)
|
||||
it_behaves_like :rational_equal_value, :==
|
||||
end
|
||||
|
||||
describe "Rational#== when passed a Rational" do
|
||||
it_behaves_like(:rational_equal_value_rat, :==)
|
||||
it_behaves_like :rational_equal_value_rat, :==
|
||||
end
|
||||
|
||||
describe "Rational#== when passed a Float" do
|
||||
it_behaves_like(:rational_equal_value_float, :==)
|
||||
it_behaves_like :rational_equal_value_float, :==
|
||||
end
|
||||
|
||||
describe "Rational#== when passed an Integer" do
|
||||
it_behaves_like(:rational_equal_value_int, :==)
|
||||
it_behaves_like :rational_equal_value_int, :==
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/exponent', __FILE__)
|
||||
|
||||
describe "Rational#**" do
|
||||
it_behaves_like(:rational_exponent, :**)
|
||||
it_behaves_like :rational_exponent, :**
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/fdiv', __FILE__)
|
||||
|
||||
describe "Rational#fdiv" do
|
||||
it_behaves_like(:rational_fdiv, :fdiv)
|
||||
it_behaves_like :rational_fdiv, :fdiv
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/floor', __FILE__)
|
||||
|
||||
describe "Rational#floor" do
|
||||
it_behaves_like(:rational_floor, :floor)
|
||||
it_behaves_like :rational_floor, :floor
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/hash', __FILE__)
|
||||
|
||||
describe "Rational#hash" do
|
||||
it_behaves_like(:rational_hash, :hash)
|
||||
it_behaves_like :rational_hash, :hash
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/inspect', __FILE__)
|
||||
|
||||
describe "Rational#inspect" do
|
||||
it_behaves_like(:rational_inspect, :inspect)
|
||||
it_behaves_like :rational_inspect, :inspect
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/abs', __FILE__)
|
||||
|
||||
describe "Rational#abs" do
|
||||
it_behaves_like(:rational_abs, :magnitude)
|
||||
it_behaves_like :rational_abs, :magnitude
|
||||
end
|
||||
|
|
|
@ -2,6 +2,6 @@ require File.expand_path('../../../shared/rational/minus', __FILE__)
|
|||
require File.expand_path('../../../shared/rational/arithmetic_exception_in_coerce', __FILE__)
|
||||
|
||||
describe "Rational#-" do
|
||||
it_behaves_like(:rational_minus, :-)
|
||||
it_behaves_like :rational_minus, :-
|
||||
it_behaves_like :rational_arithmetic_exception_in_coerce, :-
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/modulo', __FILE__)
|
||||
|
||||
describe "Rational#%" do
|
||||
it_behaves_like(:rational_modulo, :%)
|
||||
it_behaves_like :rational_modulo, :%
|
||||
end
|
||||
|
|
|
@ -2,18 +2,18 @@ require File.expand_path('../../../shared/rational/multiply', __FILE__)
|
|||
require File.expand_path('../../../shared/rational/arithmetic_exception_in_coerce', __FILE__)
|
||||
|
||||
describe "Rational#*" do
|
||||
it_behaves_like(:rational_multiply, :*)
|
||||
it_behaves_like :rational_multiply, :*
|
||||
it_behaves_like :rational_arithmetic_exception_in_coerce, :*
|
||||
end
|
||||
|
||||
describe "Rational#* passed a Rational" do
|
||||
it_behaves_like(:rational_multiply_rat, :*)
|
||||
it_behaves_like :rational_multiply_rat, :*
|
||||
end
|
||||
|
||||
describe "Rational#* passed a Float" do
|
||||
it_behaves_like(:rational_multiply_float, :*)
|
||||
it_behaves_like :rational_multiply_float, :*
|
||||
end
|
||||
|
||||
describe "Rational#* passed an Integer" do
|
||||
it_behaves_like(:rational_multiply_int, :*)
|
||||
it_behaves_like :rational_multiply_int, :*
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/numerator', __FILE__)
|
||||
|
||||
describe "Rational#numerator" do
|
||||
it_behaves_like(:rational_numerator, :numerator)
|
||||
it_behaves_like :rational_numerator, :numerator
|
||||
end
|
||||
|
|
|
@ -2,17 +2,17 @@ require File.expand_path('../../../shared/rational/plus', __FILE__)
|
|||
require File.expand_path('../../../shared/rational/arithmetic_exception_in_coerce', __FILE__)
|
||||
|
||||
describe "Rational#+" do
|
||||
it_behaves_like(:rational_plus, :+)
|
||||
it_behaves_like :rational_plus, :+
|
||||
it_behaves_like :rational_arithmetic_exception_in_coerce, :+
|
||||
end
|
||||
|
||||
describe "Rational#+ with a Rational" do
|
||||
it_behaves_like(:rational_plus_rat, :+)
|
||||
it_behaves_like :rational_plus_rat, :+
|
||||
end
|
||||
describe "Rational#+ with a Float" do
|
||||
it_behaves_like(:rational_plus_float, :+)
|
||||
it_behaves_like :rational_plus_float, :+
|
||||
end
|
||||
|
||||
describe "Rational#+ with an Integer" do
|
||||
it_behaves_like(:rational_plus_int, :+)
|
||||
it_behaves_like :rational_plus_int, :+
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/divide', __FILE__)
|
||||
|
||||
describe "Rational#quo" do
|
||||
it_behaves_like(:rational_divide, :quo)
|
||||
it_behaves_like :rational_divide, :quo
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/remainder', __FILE__)
|
||||
|
||||
describe "Rational#remainder" do
|
||||
it_behaves_like(:rational_remainder, :remainder)
|
||||
it_behaves_like :rational_remainder, :remainder
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/round', __FILE__)
|
||||
|
||||
describe "Rational#round" do
|
||||
it_behaves_like(:rational_round, :round)
|
||||
it_behaves_like :rational_round, :round
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/to_f', __FILE__)
|
||||
|
||||
describe "Rational#to_f" do
|
||||
it_behaves_like(:rational_to_f, :to_f)
|
||||
it_behaves_like :rational_to_f, :to_f
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/to_i', __FILE__)
|
||||
|
||||
describe "Rational#to_i" do
|
||||
it_behaves_like(:rational_to_i, :to_i)
|
||||
it_behaves_like :rational_to_i, :to_i
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require File.expand_path('../../../shared/rational/to_r', __FILE__)
|
||||
|
||||
describe "Rational#to_r" do
|
||||
it_behaves_like(:rational_to_r, :to_r)
|
||||
it_behaves_like :rational_to_r, :to_r
|
||||
|
||||
it "raises TypeError trying to convert BasicObject" do
|
||||
obj = BasicObject.new
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/to_s', __FILE__)
|
||||
|
||||
describe "Rational#to_s" do
|
||||
it_behaves_like(:rational_to_s, :to_s)
|
||||
it_behaves_like :rational_to_s, :to_s
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../shared/rational/truncate', __FILE__)
|
||||
|
||||
describe "Rational#truncate" do
|
||||
it_behaves_like(:rational_truncate, :truncate)
|
||||
it_behaves_like :rational_truncate, :truncate
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue