Sha256: 0868804bd50c7f8b87abe53305d178e354b67fa97192ab5871ae024ec7356aef

Contents?: true

Size: 1.62 KB

Versions: 12

Compression:

Stored size: 1.62 KB

Contents

require 'spec_helper'

describe Rearview::Vm do

  let(:vm) { Rearview::Vm.new }

  context '#heap' do
    it "should be present" do
      expect(vm.heap.present?).to be_true
    end
  end

  context '#non_heap' do
    it "should be present" do
      expect(vm.non_heap.present?).to be_true
    end
  end

  context '#total_memory' do
    it "should be non-zero" do
      expect(vm.total_memory>0).to be_true
    end
  end

  context '#free_memory' do
    it "should be non-zero" do
      expect(vm.free_memory>0).to be_true
    end
  end

  context '#max_memory' do
    it "should be non-zero" do
      expect(vm.max_memory>0).to be_true
    end
  end

  describe Rearview::Vm::Memory do
    let(:heap) { Rearview::Vm::Heap.new }
    let(:non_heap) { Rearview::Vm::Heap.new }

    context '#committed' do
      it "heap should be non-zero" do
        expect(heap.committed>0).to be_true
      end
      it "non_heap should be non-zero" do
        expect(non_heap.committed>0).to be_true
      end
    end

    context '#init' do
      it "heap should be non-zero" do
        expect(heap.init>0).to be_true
      end
      it "non_heap should be non-zero" do
        expect(non_heap.init>0).to be_true
      end
    end

    context '#max' do
      it "heap should be non-zero" do
        expect(heap.max>0).to be_true
      end
      it "non_heap should be non-zero" do
        expect(non_heap.max>0).to be_true
      end
    end

    context '#used' do
      it "heap should be non-zero" do
        expect(heap.used>0).to be_true
      end
      it "non_heap should be non-zero" do
        expect(non_heap.used>0).to be_true
      end
    end

  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby spec/lib/rearview/vm_spec.rb
rearview-1.2.2.rc.2-jruby spec/lib/rearview/vm_spec.rb
rearview-1.2.2.rc.1-jruby spec/lib/rearview/vm_spec.rb
rearview-1.2.1-jruby spec/lib/rearview/vm_spec.rb
rearview-1.2.0-jruby spec/lib/rearview/vm_spec.rb
rearview-1.1.2-jruby spec/lib/rearview/vm_spec.rb
rearview-1.1.1-jruby spec/lib/rearview/vm_spec.rb
rearview-1.1.0-jruby spec/lib/rearview/vm_spec.rb
rearview-1.0.3.rc.4-jruby spec/lib/rearview/vm_spec.rb
rearview-1.0.3.rc.3-jruby spec/lib/rearview/vm_spec.rb
rearview-1.0.3.rc.2-jruby spec/lib/rearview/vm_spec.rb
rearview-1.0.3.rc.1-jruby spec/lib/rearview/vm_spec.rb