summaryrefslogtreecommitdiff
path: root/spec/ruby/core/gc/total_time_spec.rb
blob: fcc8f45a834f6a2dd610a5467456d2c848f6b7f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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