diff options
Diffstat (limited to 'spec/ruby/core/gc/count_spec.rb')
| -rw-r--r-- | spec/ruby/core/gc/count_spec.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/ruby/core/gc/count_spec.rb b/spec/ruby/core/gc/count_spec.rb index 3caa2c9aac..fe20c4ed2b 100644 --- a/spec/ruby/core/gc/count_spec.rb +++ b/spec/ruby/core/gc/count_spec.rb @@ -1,7 +1,17 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "GC.count" do it "returns an integer" do - GC.count.should be_kind_of(Integer) + GC.count.should.is_a?(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 |
