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:
parent
75bfc6440d
commit
1d15d5f080
4370 changed files with 0 additions and 0 deletions
7
spec/ruby/core/gc/count_spec.rb
Normal file
7
spec/ruby/core/gc/count_spec.rb
Normal 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
|
18
spec/ruby/core/gc/disable_spec.rb
Normal file
18
spec/ruby/core/gc/disable_spec.rb
Normal 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
|
13
spec/ruby/core/gc/enable_spec.rb
Normal file
13
spec/ruby/core/gc/enable_spec.rb
Normal 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
|
15
spec/ruby/core/gc/garbage_collect_spec.rb
Normal file
15
spec/ruby/core/gc/garbage_collect_spec.rb
Normal 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
|
5
spec/ruby/core/gc/profiler/clear_spec.rb
Normal file
5
spec/ruby/core/gc/profiler/clear_spec.rb
Normal 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
|
16
spec/ruby/core/gc/profiler/disable_spec.rb
Normal file
16
spec/ruby/core/gc/profiler/disable_spec.rb
Normal 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
|
17
spec/ruby/core/gc/profiler/enable_spec.rb
Normal file
17
spec/ruby/core/gc/profiler/enable_spec.rb
Normal 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
|
21
spec/ruby/core/gc/profiler/enabled_spec.rb
Normal file
21
spec/ruby/core/gc/profiler/enabled_spec.rb
Normal 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
|
5
spec/ruby/core/gc/profiler/report_spec.rb
Normal file
5
spec/ruby/core/gc/profiler/report_spec.rb
Normal 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
|
7
spec/ruby/core/gc/profiler/result_spec.rb
Normal file
7
spec/ruby/core/gc/profiler/result_spec.rb
Normal 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
|
7
spec/ruby/core/gc/profiler/total_time_spec.rb
Normal file
7
spec/ruby/core/gc/profiler/total_time_spec.rb
Normal 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
|
8
spec/ruby/core/gc/start_spec.rb
Normal file
8
spec/ruby/core/gc/start_spec.rb
Normal 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
|
27
spec/ruby/core/gc/stress_spec.rb
Normal file
27
spec/ruby/core/gc/stress_spec.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue