diff options
Diffstat (limited to 'spec/ruby/core/gc/count_spec.rb')
-rw-r--r-- | spec/ruby/core/gc/count_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/ruby/core/gc/count_spec.rb b/spec/ruby/core/gc/count_spec.rb index 11648ac9be..af2fbbe713 100644 --- a/spec/ruby/core/gc/count_spec.rb +++ b/spec/ruby/core/gc/count_spec.rb @@ -4,4 +4,14 @@ describe "GC.count" do it "returns an integer" do GC.count.should be_kind_of(Integer) end + + it "increases as collections are run" do + count_before = GC.count + i = 0 + while GC.count <= count_before and i < 10 + GC.start + i += 1 + end + GC.count.should > count_before + end end |