mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@a454137
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fc1f3f14d3
commit
9dc121cc57
143 changed files with 328 additions and 146 deletions
|
@ -10,6 +10,11 @@ AllCops:
|
||||||
Layout/TrailingWhitespace:
|
Layout/TrailingWhitespace:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/TrailingBlankLines:
|
||||||
|
Enabled: true
|
||||||
|
Exclude:
|
||||||
|
- library/coverage/fixtures/some_class.rb
|
||||||
|
|
||||||
Lint:
|
Lint:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|
|
@ -87,12 +87,10 @@ Lint/MultipleCompare:
|
||||||
# Offense count: 12
|
# Offense count: 12
|
||||||
Lint/ParenthesesAsGroupedExpression:
|
Lint/ParenthesesAsGroupedExpression:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'command_line/rubyopt_spec.rb'
|
|
||||||
- 'core/string/fixtures/freeze_magic_comment.rb'
|
- 'core/string/fixtures/freeze_magic_comment.rb'
|
||||||
- 'language/block_spec.rb'
|
- 'language/block_spec.rb'
|
||||||
- 'language/fixtures/send.rb'
|
- 'language/fixtures/send.rb'
|
||||||
- 'language/method_spec.rb'
|
- 'language/method_spec.rb'
|
||||||
- 'library/socket/socket/getaddrinfo_spec.rb'
|
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
|
|
67
spec/ruby/command_line/rubylib_spec.rb
Normal file
67
spec/ruby/command_line/rubylib_spec.rb
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
require_relative '../spec_helper'
|
||||||
|
|
||||||
|
describe "The RUBYLIB environment variable" do
|
||||||
|
before :each do
|
||||||
|
@rubylib, ENV["RUBYLIB"] = ENV["RUBYLIB"], nil
|
||||||
|
end
|
||||||
|
|
||||||
|
after :each do
|
||||||
|
ENV["RUBYLIB"] = @rubylib
|
||||||
|
end
|
||||||
|
|
||||||
|
it "adds a directory to $LOAD_PATH" do
|
||||||
|
dir = tmp("rubylib/incl")
|
||||||
|
ENV["RUBYLIB"] = dir
|
||||||
|
paths = ruby_exe("puts $LOAD_PATH").lines.map(&:chomp)
|
||||||
|
paths.should include(dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "adds a colon-separated list of directories to $LOAD_PATH" do
|
||||||
|
dir1, dir2 = tmp("rubylib/incl1"), tmp("rubylib/incl2")
|
||||||
|
ENV["RUBYLIB"] = "#{dir1}:#{dir2}"
|
||||||
|
paths = ruby_exe("puts $LOAD_PATH").lines.map(&:chomp)
|
||||||
|
paths.should include(dir1)
|
||||||
|
paths.should include(dir2)
|
||||||
|
paths.index(dir1).should < paths.index(dir2)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "adds the directory at the front of $LOAD_PATH" do
|
||||||
|
dir = tmp("rubylib/incl_front")
|
||||||
|
ENV["RUBYLIB"] = dir
|
||||||
|
paths = ruby_exe("puts $LOAD_PATH").lines.map(&:chomp)
|
||||||
|
if PlatformGuard.implementation? :ruby
|
||||||
|
# In a MRI checkout, $PWD and some extra -I entries end up as
|
||||||
|
# the first entries in $LOAD_PATH. So just assert that it's not last.
|
||||||
|
idx = paths.index(dir)
|
||||||
|
idx.should < paths.size-1
|
||||||
|
else
|
||||||
|
paths[0].should == dir
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
it "adds the directory after directories added by -I" do
|
||||||
|
dash_i_dir = tmp("dash_I_include")
|
||||||
|
rubylib_dir = tmp("rubylib_include")
|
||||||
|
ENV["RUBYLIB"] = rubylib_dir
|
||||||
|
paths = ruby_exe("puts $LOAD_PATH", options: "-I #{dash_i_dir}").lines.map(&:chomp)
|
||||||
|
paths.should include(dash_i_dir)
|
||||||
|
paths.should include(rubylib_dir)
|
||||||
|
paths.index(dash_i_dir).should < paths.index(rubylib_dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "adds the directory after directories added by -I within RUBYOPT" do
|
||||||
|
rubyopt_dir = tmp("rubyopt_include")
|
||||||
|
rubylib_dir = tmp("rubylib_include")
|
||||||
|
ENV["RUBYLIB"] = rubylib_dir
|
||||||
|
paths = ruby_exe("puts $LOAD_PATH", env: { "RUBYOPT" => "-I#{rubyopt_dir}" }).lines.map(&:chomp)
|
||||||
|
paths.should include(rubyopt_dir)
|
||||||
|
paths.should include(rubylib_dir)
|
||||||
|
paths.index(rubyopt_dir).should < paths.index(rubylib_dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "keeps spaces in the value" do
|
||||||
|
ENV["RUBYLIB"] = " rubylib/incl "
|
||||||
|
out = ruby_exe("puts $LOAD_PATH")
|
||||||
|
out.should include(" rubylib/incl ")
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,11 +1,11 @@
|
||||||
require_relative '../spec_helper'
|
require_relative '../spec_helper'
|
||||||
|
|
||||||
describe "Processing RUBYOPT" do
|
describe "Processing RUBYOPT" do
|
||||||
before (:each) do
|
before :each do
|
||||||
@rubyopt, ENV["RUBYOPT"] = ENV["RUBYOPT"], nil
|
@rubyopt, ENV["RUBYOPT"] = ENV["RUBYOPT"], nil
|
||||||
end
|
end
|
||||||
|
|
||||||
after (:each) do
|
after :each do
|
||||||
ENV["RUBYOPT"] = @rubyopt
|
ENV["RUBYOPT"] = @rubyopt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -99,4 +99,3 @@ describe "Class.inherited" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -39,4 +39,3 @@ describe "Enumerable#zip" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
2
spec/ruby/core/env/shared/key.rb
vendored
2
spec/ruby/core/env/shared/key.rb
vendored
|
@ -11,5 +11,3 @@ describe :env_key, shared: true do
|
||||||
ENV.send(@method, "should_never_be_set").should be_nil
|
ENV.send(@method, "should_never_be_set").should be_nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,3 @@ describe "UncaughtThrowError#tag" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -31,4 +31,3 @@ describe :float_arithmetic_exception_in_coerce, shared: true do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -33,4 +33,3 @@ describe :float_comparison_exception_in_coerce, shared: true do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,4 +10,3 @@ describe "Hash#clone" do
|
||||||
clone.should_not equal hash
|
clone.should_not equal hash
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/key'
|
||||||
describe "Hash#has_key?" do
|
describe "Hash#has_key?" do
|
||||||
it_behaves_like :hash_key_p, :has_key?
|
it_behaves_like :hash_key_p, :has_key?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/value'
|
||||||
describe "Hash#has_value?" do
|
describe "Hash#has_value?" do
|
||||||
it_behaves_like :hash_value_p, :has_value?
|
it_behaves_like :hash_value_p, :has_value?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/value'
|
||||||
describe "Hash#value?" do
|
describe "Hash#value?" do
|
||||||
it_behaves_like :hash_value_p, :value?
|
it_behaves_like :hash_value_p, :value?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,3 @@ require_relative 'shared/abs'
|
||||||
describe "Integer#abs" do
|
describe "Integer#abs" do
|
||||||
it_behaves_like :integer_abs, :abs
|
it_behaves_like :integer_abs, :abs
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -93,4 +93,3 @@ describe "Integer#/" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,3 @@ require_relative 'shared/equal'
|
||||||
describe "Integer#==" do
|
describe "Integer#==" do
|
||||||
it_behaves_like :integer_equal, :==
|
it_behaves_like :integer_equal, :==
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -47,4 +47,3 @@ describe "Integer#>" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -47,4 +47,3 @@ describe "Integer#>=" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -49,4 +49,3 @@ describe "Integer#<" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -52,4 +52,3 @@ describe "Integer#<=" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,3 @@ require_relative 'shared/abs'
|
||||||
describe "Integer#magnitude" do
|
describe "Integer#magnitude" do
|
||||||
it_behaves_like :integer_abs, :magnitude
|
it_behaves_like :integer_abs, :magnitude
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -47,4 +47,3 @@ describe "Integer#-" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -49,4 +49,3 @@ describe "Integer#*" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -47,4 +47,3 @@ describe "Integer#+" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ end
|
||||||
describe "IO#pos=" do
|
describe "IO#pos=" do
|
||||||
it_behaves_like :io_set_pos, :pos=
|
it_behaves_like :io_set_pos, :pos=
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -51,4 +51,3 @@ describe IO, "#print" do
|
||||||
lambda { IOSpecs.closed_io.print("stuff") }.should raise_error(IOError)
|
lambda { IOSpecs.closed_io.print("stuff") }.should raise_error(IOError)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -69,4 +69,25 @@ describe :io_write, shared: true do
|
||||||
lambda { IOSpecs.closed_io.send(@method, "hello") }.should raise_error(IOError)
|
lambda { IOSpecs.closed_io.send(@method, "hello") }.should raise_error(IOError)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "on a pipe" do
|
||||||
|
before :each do
|
||||||
|
@r, @w = IO.pipe
|
||||||
|
end
|
||||||
|
|
||||||
|
after :each do
|
||||||
|
@r.close
|
||||||
|
@w.close
|
||||||
|
end
|
||||||
|
|
||||||
|
it "writes the given String to the pipe" do
|
||||||
|
@w.send(@method, "foo")
|
||||||
|
@w.close
|
||||||
|
@r.read.should == "foo"
|
||||||
|
end
|
||||||
|
|
||||||
|
it "raises Errno::EPIPE if the read end is closed" do
|
||||||
|
@r.close
|
||||||
|
-> { @w.send(@method, "foo") }.should raise_error(Errno::EPIPE, "Broken pipe")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,4 +8,3 @@ describe "Kernel#eql?" do
|
||||||
|
|
||||||
it_behaves_like :object_equal, :eql?
|
it_behaves_like :object_equal, :eql?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -213,4 +213,132 @@ describe "Kernel#eval" do
|
||||||
code = fixture __FILE__, "eval_return_without_lambda.rb"
|
code = fixture __FILE__, "eval_return_without_lambda.rb"
|
||||||
ruby_exe(code).chomp.should == "a,b,c,e,LocalJumpError,f"
|
ruby_exe(code).chomp.should == "a,b,c,e,LocalJumpError,f"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "with a magic encoding comment" do
|
||||||
|
it "uses the magic comment encoding for the encoding of literal strings" do
|
||||||
|
code = "# encoding: UTF-8\n'é'.encoding".b
|
||||||
|
code.encoding.should == Encoding::BINARY
|
||||||
|
eval(code).should == Encoding::UTF_8
|
||||||
|
end
|
||||||
|
|
||||||
|
it "uses the magic comment encoding for parsing constants" do
|
||||||
|
code = <<CODE.b
|
||||||
|
# encoding: UTF-8
|
||||||
|
class EvalSpecs
|
||||||
|
Vπ = 3.14
|
||||||
|
end
|
||||||
|
CODE
|
||||||
|
code.encoding.should == Encoding::BINARY
|
||||||
|
eval(code)
|
||||||
|
EvalSpecs.constants(false).should include(:"Vπ")
|
||||||
|
EvalSpecs::Vπ.should == 3.14
|
||||||
|
end
|
||||||
|
|
||||||
|
it "allows an emacs-style magic comment encoding" do
|
||||||
|
code = <<CODE.b
|
||||||
|
# -*- encoding: UTF-8 -*-
|
||||||
|
class EvalSpecs
|
||||||
|
Vπemacs = 3.14
|
||||||
|
end
|
||||||
|
CODE
|
||||||
|
code.encoding.should == Encoding::BINARY
|
||||||
|
eval(code)
|
||||||
|
EvalSpecs.constants(false).should include(:"Vπemacs")
|
||||||
|
EvalSpecs::Vπemacs.should == 3.14
|
||||||
|
end
|
||||||
|
|
||||||
|
it "allows spaces before the magic encoding comment" do
|
||||||
|
code = <<CODE.b
|
||||||
|
\t \t # encoding: UTF-8
|
||||||
|
class EvalSpecs
|
||||||
|
Vπspaces = 3.14
|
||||||
|
end
|
||||||
|
CODE
|
||||||
|
code.encoding.should == Encoding::BINARY
|
||||||
|
eval(code)
|
||||||
|
EvalSpecs.constants(false).should include(:"Vπspaces")
|
||||||
|
EvalSpecs::Vπspaces.should == 3.14
|
||||||
|
end
|
||||||
|
|
||||||
|
it "allows a shebang line before the magic encoding comment" do
|
||||||
|
code = <<CODE.b
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
# encoding: UTF-8
|
||||||
|
class EvalSpecs
|
||||||
|
Vπshebang = 3.14
|
||||||
|
end
|
||||||
|
CODE
|
||||||
|
code.encoding.should == Encoding::BINARY
|
||||||
|
eval(code)
|
||||||
|
EvalSpecs.constants(false).should include(:"Vπshebang")
|
||||||
|
EvalSpecs::Vπshebang.should == 3.14
|
||||||
|
end
|
||||||
|
|
||||||
|
it "allows a shebang line and some spaces before the magic encoding comment" do
|
||||||
|
code = <<CODE.b
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
# encoding: UTF-8
|
||||||
|
class EvalSpecs
|
||||||
|
Vπshebang_spaces = 3.14
|
||||||
|
end
|
||||||
|
CODE
|
||||||
|
code.encoding.should == Encoding::BINARY
|
||||||
|
eval(code)
|
||||||
|
EvalSpecs.constants(false).should include(:"Vπshebang_spaces")
|
||||||
|
EvalSpecs::Vπshebang_spaces.should == 3.14
|
||||||
|
end
|
||||||
|
|
||||||
|
it "allows a magic encoding comment and a subsequent frozen_string_literal magic comment" do
|
||||||
|
# Make sure frozen_string_literal is not default true
|
||||||
|
eval("'foo'".b).frozen?.should be_false
|
||||||
|
|
||||||
|
code = <<CODE.b
|
||||||
|
# encoding: UTF-8
|
||||||
|
# frozen_string_literal: true
|
||||||
|
class EvalSpecs
|
||||||
|
Vπstring = "frozen"
|
||||||
|
end
|
||||||
|
CODE
|
||||||
|
code.encoding.should == Encoding::BINARY
|
||||||
|
eval(code)
|
||||||
|
EvalSpecs.constants(false).should include(:"Vπstring")
|
||||||
|
EvalSpecs::Vπstring.should == "frozen"
|
||||||
|
EvalSpecs::Vπstring.encoding.should == Encoding::UTF_8
|
||||||
|
EvalSpecs::Vπstring.frozen?.should be_true
|
||||||
|
end
|
||||||
|
|
||||||
|
it "allows a magic encoding comment and a frozen_string_literal magic comment on the same line in emacs style" do
|
||||||
|
code = <<CODE.b
|
||||||
|
# -*- encoding: UTF-8; frozen_string_literal: true -*-
|
||||||
|
class EvalSpecs
|
||||||
|
Vπsame_line = "frozen"
|
||||||
|
end
|
||||||
|
CODE
|
||||||
|
code.encoding.should == Encoding::BINARY
|
||||||
|
eval(code)
|
||||||
|
EvalSpecs.constants(false).should include(:"Vπsame_line")
|
||||||
|
EvalSpecs::Vπsame_line.should == "frozen"
|
||||||
|
EvalSpecs::Vπsame_line.encoding.should == Encoding::UTF_8
|
||||||
|
EvalSpecs::Vπsame_line.frozen?.should be_true
|
||||||
|
end
|
||||||
|
|
||||||
|
it "ignores the magic encoding comment if it is after a frozen_string_literal magic comment" do
|
||||||
|
code = <<CODE.b
|
||||||
|
# frozen_string_literal: true
|
||||||
|
# encoding: UTF-8
|
||||||
|
class EvalSpecs
|
||||||
|
Vπfrozen_first = "frozen"
|
||||||
|
end
|
||||||
|
CODE
|
||||||
|
code.encoding.should == Encoding::BINARY
|
||||||
|
eval(code)
|
||||||
|
EvalSpecs.constants(false).should_not include(:"Vπfrozen_first")
|
||||||
|
binary_constant = "Vπfrozen_first".b.to_sym
|
||||||
|
EvalSpecs.constants(false).should include(binary_constant)
|
||||||
|
value = EvalSpecs.const_get(binary_constant)
|
||||||
|
value.should == "frozen"
|
||||||
|
value.encoding.should == Encoding::BINARY
|
||||||
|
value.frozen?.should be_true
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -83,4 +83,3 @@ describe "Kernel.lambda" do
|
||||||
KernelSpecs::Lambda.new.outer.should == :good
|
KernelSpecs::Lambda.new.outer.should == :good
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -58,4 +58,3 @@ describe "Kernel.printf" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -53,4 +53,3 @@ describe "Module#protected" do
|
||||||
end.should raise_error(NameError)
|
end.should raise_error(NameError)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -55,4 +55,3 @@ describe "String#clone" do
|
||||||
clone.should == "string"
|
clone.should == "string"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -11,4 +11,3 @@ describe "String#%" do
|
||||||
format % args
|
format % args
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -24,4 +24,3 @@ describe "SystemExit#initialize" do
|
||||||
s.status.should == 0
|
s.status.should == 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,4 +6,3 @@ require_relative 'shared/wakeup'
|
||||||
describe "Thread#run" do
|
describe "Thread#run" do
|
||||||
it_behaves_like :thread_wakeup, :run
|
it_behaves_like :thread_wakeup, :run
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -53,4 +53,3 @@ describe "Time#_dump" do
|
||||||
t.send(:_dump).should == "\364\001\031\200\313\000\020\004"
|
t.send(:_dump).should == "\364\001\031\200\313\000\020\004"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -17,4 +17,3 @@ ruby_version_is '2.4' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -31,4 +31,3 @@ module MetaClassSpecs
|
||||||
class D < C; end
|
class D < C; end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -32,4 +32,3 @@ describe "BigDecimal#finite?" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -46,4 +46,3 @@ describe "BigDecimal#precs" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,4 +10,3 @@ describe "BigDecimal#quo" do
|
||||||
BigDecimal("NaN").quo(BigDecimal("1")).nan?.should == true
|
BigDecimal("NaN").quo(BigDecimal("1")).nan?.should == true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -44,4 +44,3 @@ describe "BigDecimal#sign" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -84,5 +84,3 @@ describe "BigDecimal#split" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,4 +52,3 @@ describe "BigDecimal#to_f" do
|
||||||
@zero_neg.to_f.to_s.should == "-0.0"
|
@zero_neg.to_f.to_s.should == "-0.0"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -70,4 +70,3 @@ describe "BigDecimal#to_s" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,3 @@ describe "BigDecimal#+@" do
|
||||||
fifth.send(:+@).should == fifth
|
fifth.send(:+@).should == fifth
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,4 +25,3 @@ describe "BigDecimal#zero?" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,3 @@ end
|
||||||
# 17 18 19 20 21 22 23
|
# 17 18 19 20 21 22 23
|
||||||
# 24 25 26 27 28 29 30
|
# 24 25 26 27 28 29 30
|
||||||
# 31
|
# 31
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,3 @@ describe "Date#gregorian_leap?" do
|
||||||
Date.gregorian_leap?(2002).should be_false
|
Date.gregorian_leap?(2002).should be_false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/ordinal'
|
||||||
describe "Date.ordinal" do
|
describe "Date.ordinal" do
|
||||||
it_behaves_like :date_ordinal, :ordinal
|
it_behaves_like :date_ordinal, :ordinal
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,3 @@ describe "Date#valid_civil?" do
|
||||||
it_behaves_like :date_valid_civil?, :valid_civil?
|
it_behaves_like :date_valid_civil?, :valid_civil?
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,5 +6,3 @@ describe "Date#valid_commercial?" do
|
||||||
|
|
||||||
it_behaves_like :date_valid_commercial?, :valid_commercial?
|
it_behaves_like :date_valid_commercial?, :valid_commercial?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,3 @@ describe "Date.valid_jd?" do
|
||||||
it_behaves_like :date_valid_jd?, :valid_jd?
|
it_behaves_like :date_valid_jd?, :valid_jd?
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,3 @@ describe "Date.valid_ordinal?" do
|
||||||
it_behaves_like :date_valid_ordinal?, :valid_ordinal?
|
it_behaves_like :date_valid_ordinal?, :valid_ordinal?
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::MD5#block_length" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::MD5#digest_length" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -35,4 +35,3 @@ describe "Digest::MD5#==" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::MD5#inspect" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/length'
|
||||||
describe "Digest::MD5#length" do
|
describe "Digest::MD5#length" do
|
||||||
it_behaves_like :md5_length, :length
|
it_behaves_like :md5_length, :length
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,3 @@ describe "Digest::MD5#reset" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/length'
|
||||||
describe "Digest::MD5#size" do
|
describe "Digest::MD5#size" do
|
||||||
it_behaves_like :md5_length, :size
|
it_behaves_like :md5_length, :size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::SHA256#block_length" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::SHA256#digest_length" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -34,4 +34,3 @@ describe "Digest::SHA256#==" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::SHA256#inspect" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/length'
|
||||||
describe "Digest::SHA256#length" do
|
describe "Digest::SHA256#length" do
|
||||||
it_behaves_like :sha256_length, :length
|
it_behaves_like :sha256_length, :length
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,3 @@ describe "Digest::SHA256#reset" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/length'
|
||||||
describe "Digest::SHA256#size" do
|
describe "Digest::SHA256#size" do
|
||||||
it_behaves_like :sha256_length, :size
|
it_behaves_like :sha256_length, :size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::SHA384#block_length" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::SHA384#digest_length" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -34,4 +34,3 @@ describe "Digest::SHA384#==" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::SHA384#inspect" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/length'
|
||||||
describe "Digest::SHA384#length" do
|
describe "Digest::SHA384#length" do
|
||||||
it_behaves_like :sha384_length, :length
|
it_behaves_like :sha384_length, :length
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,3 @@ describe "Digest::SHA384#reset" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/length'
|
||||||
describe "Digest::SHA384#size" do
|
describe "Digest::SHA384#size" do
|
||||||
it_behaves_like :sha384_length, :size
|
it_behaves_like :sha384_length, :size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::SHA512#block_length" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::SHA512#digest_length" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -34,4 +34,3 @@ describe "Digest::SHA512#==" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,3 @@ describe "Digest::SHA512#inspect" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/length'
|
||||||
describe "Digest::SHA512#length" do
|
describe "Digest::SHA512#length" do
|
||||||
it_behaves_like :sha512_length, :length
|
it_behaves_like :sha512_length, :length
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,3 @@ describe "Digest::SHA512#reset" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/length'
|
||||||
describe "Digest::SHA512#size" do
|
describe "Digest::SHA512#size" do
|
||||||
it_behaves_like :sha512_length, :size
|
it_behaves_like :sha512_length, :size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -94,4 +94,3 @@ END
|
||||||
}.should raise_error(NameError)
|
}.should raise_error(NameError)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/html_escape'
|
||||||
describe "ERB::Util.html_escape" do
|
describe "ERB::Util.html_escape" do
|
||||||
it_behaves_like :erb_util_html_escape, :html_escape
|
it_behaves_like :erb_util_html_escape, :html_escape
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,3 @@ require_relative 'shared/url_encode'
|
||||||
describe "ERB::Util.u" do
|
describe "ERB::Util.u" do
|
||||||
it_behaves_like :erb_util_url_encode, :u
|
it_behaves_like :erb_util_url_encode, :u
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -42,5 +42,3 @@ describe "IPAddr#ipv4_mapped" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,4 +6,3 @@ require_relative 'shared/request_head'
|
||||||
describe "Net::HTTP#head2" do
|
describe "Net::HTTP#head2" do
|
||||||
it_behaves_like :net_ftp_request_head, :head2
|
it_behaves_like :net_ftp_request_head, :head2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -74,4 +74,3 @@ describe "Net::HTTP#post" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,4 +6,3 @@ require_relative 'shared/each_capitalized'
|
||||||
describe "Net::HTTPHeader#each_capitalized" do
|
describe "Net::HTTPHeader#each_capitalized" do
|
||||||
it_behaves_like :net_httpheader_each_capitalized, :each_capitalized
|
it_behaves_like :net_httpheader_each_capitalized, :each_capitalized
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -83,4 +83,3 @@ describe "Net::HTTPResponse#read_body" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,3 @@ describe "Pathname#absolute?" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,3 @@ describe "Pathname#==" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,3 @@ describe "Pathname#hash" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,3 @@ describe "Pathname#parent" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,3 @@ describe "Pathname#relative?" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -24,4 +24,3 @@ describe "Pathname#root?" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,3 @@ describe "Pathname#sub" do
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
11
spec/ruby/library/rbconfig/rbconfig_spec.rb
Normal file
11
spec/ruby/library/rbconfig/rbconfig_spec.rb
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
require_relative '../../spec_helper'
|
||||||
|
require 'rbconfig'
|
||||||
|
|
||||||
|
describe 'RbConfig::CONFIG values' do
|
||||||
|
it 'are all strings' do
|
||||||
|
RbConfig::CONFIG.each do |k, v|
|
||||||
|
k.should be_kind_of String
|
||||||
|
v.should be_kind_of String
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue