1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Move spec/rubyspec to spec/ruby for consistency

* Other ruby implementations use the spec/ruby directory.
  [Misc #13792] [ruby-core:82287]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2017-09-20 20:18:52 +00:00
parent 75bfc6440d
commit 1d15d5f080
4370 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,7 @@
require File.expand_path('../../../spec_helper', __FILE__)
describe "GC.count" do
it "returns an integer" do
GC.count.should be_kind_of(Integer)
end
end

View file

@ -0,0 +1,18 @@
require File.expand_path('../../../spec_helper', __FILE__)
describe "GC.disable" do
after :each do
GC.enable
end
it "returns true iff the garbage collection was previously disabled" do
GC.enable
GC.disable.should == false
GC.disable.should == true
GC.disable.should == true
GC.enable
GC.disable.should == false
GC.disable.should == true
end
end

View file

@ -0,0 +1,13 @@
require File.expand_path('../../../spec_helper', __FILE__)
describe "GC.enable" do
it "returns true iff the garbage collection was already disabled" do
GC.enable
GC.enable.should == false
GC.disable
GC.enable.should == true
GC.enable.should == false
end
end

View file

@ -0,0 +1,15 @@
require File.expand_path('../../../spec_helper', __FILE__)
describe "GC#garbage_collect" do
before :each do
@obj = Object.new
@obj.extend(GC)
end
it "always returns nil" do
@obj.garbage_collect.should == nil
@obj.garbage_collect.should == nil
end
end

View file

@ -0,0 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
describe "GC::Profiler.clear" do
it "needs to be reviewed for spec completeness"
end

View file

@ -0,0 +1,16 @@
require File.expand_path('../../../../spec_helper', __FILE__)
describe "GC::Profiler.disable" do
before do
@status = GC::Profiler.enabled?
end
after do
@status ? GC::Profiler.enable : GC::Profiler.disable
end
it "disables the profiler" do
GC::Profiler.disable
GC::Profiler.enabled?.should == false
end
end

View file

@ -0,0 +1,17 @@
require File.expand_path('../../../../spec_helper', __FILE__)
describe "GC::Profiler.enable" do
before do
@status = GC::Profiler.enabled?
end
after do
@status ? GC::Profiler.enable : GC::Profiler.disable
end
it "enables the profiler" do
GC::Profiler.enable
GC::Profiler.enabled?.should == true
end
end

View file

@ -0,0 +1,21 @@
require File.expand_path('../../../../spec_helper', __FILE__)
describe "GC::Profiler.enabled?" do
before do
@status = GC::Profiler.enabled?
end
after do
@status ? GC::Profiler.enable : GC::Profiler.disable
end
it "reports as enabled when enabled" do
GC::Profiler.enable
GC::Profiler.enabled?.should be_true
end
it "reports as disabled when disabled" do
GC::Profiler.disable
GC::Profiler.enabled?.should be_false
end
end

View file

@ -0,0 +1,5 @@
require File.expand_path('../../../../spec_helper', __FILE__)
describe "GC::Profiler.report" do
it "needs to be reviewed for spec completeness"
end

View file

@ -0,0 +1,7 @@
require File.expand_path('../../../../spec_helper', __FILE__)
describe "GC::Profiler.result" do
it "returns a string" do
GC::Profiler.result.should be_kind_of(String)
end
end

View file

@ -0,0 +1,7 @@
require File.expand_path('../../../../spec_helper', __FILE__)
describe "GC::Profiler.total_time" do
it "returns an float" do
GC::Profiler.total_time.should be_kind_of(Float)
end
end

View file

@ -0,0 +1,8 @@
require File.expand_path('../../../spec_helper', __FILE__)
describe "GC.start" do
it "always returns nil" do
GC.start.should == nil
GC.start.should == nil
end
end

View file

@ -0,0 +1,27 @@
require File.expand_path('../../../spec_helper', __FILE__)
describe "GC.stress" do
after :each do
# make sure that we never leave these tests in stress enabled GC!
GC.stress = false
end
it "returns current status of GC stress mode" do
GC.stress.should be_false
GC.stress = true
GC.stress.should be_true
GC.stress = false
GC.stress.should be_false
end
end
describe "GC.stress=" do
after :each do
GC.stress = false
end
it "sets the stress mode" do
GC.stress = true
GC.stress.should be_true
end
end