diff options
Diffstat (limited to 'spec/ruby/core/gc/total_time_spec.rb')
-rw-r--r-- | spec/ruby/core/gc/total_time_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/ruby/core/gc/total_time_spec.rb b/spec/ruby/core/gc/total_time_spec.rb new file mode 100644 index 0000000000..fcc8f45a83 --- /dev/null +++ b/spec/ruby/core/gc/total_time_spec.rb @@ -0,0 +1,15 @@ +require_relative '../../spec_helper' + +ruby_version_is "3.1" do + describe "GC.total_time" do + it "returns an Integer" do + GC.total_time.should be_kind_of(Integer) + end + + it "increases as collections are run" do + time_before = GC.total_time + GC.start + GC.total_time.should >= time_before + end + end +end |