diff options
Diffstat (limited to 'spec/ruby/optional/capi/gc_spec.rb')
-rw-r--r-- | spec/ruby/optional/capi/gc_spec.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/ruby/optional/capi/gc_spec.rb b/spec/ruby/optional/capi/gc_spec.rb index 1c34675f0d..46c03156e4 100644 --- a/spec/ruby/optional/capi/gc_spec.rb +++ b/spec/ruby/optional/capi/gc_spec.rb @@ -42,13 +42,20 @@ describe "CApiGCSpecs" do end describe "rb_gc" do - it "increases gc count" do gc_count = GC.count @f.rb_gc GC.count.should > gc_count end - end + describe "rb_gc_adjust_memory_usage" do + # Just check that it does not throw, as it seems hard to observe any effect + it "adjusts the amount of registered external memory" do + -> { + @f.rb_gc_adjust_memory_usage(8) + @f.rb_gc_adjust_memory_usage(-8) + }.should_not raise_error + end + end end |