Sha256: d2cee0e5245fa66ffe0286191254fc2d21c4bfc0c4e225b9c9d493e9fbd56fd4
Contents?: true
Size: 712 Bytes
Versions: 4
Compression:
Stored size: 712 Bytes
Contents
require 'spec_helper' module Process::Naf describe Runner do let!(:runner) { ::Process::Naf::Runner.new } describe '#memory_available_to_spawn?' do before do Facter.should_receive(:memorysize_mb).and_return(100.0) runner.instance_variable_set(:@minimum_memory_free, 15.0) end it 'return true when there is available memory' do Facter.should_receive(:memoryfree_mb).and_return(20.0) runner.memory_available_to_spawn?.should be_true end it 'return true when there is available memory' do Facter.should_receive(:memoryfree_mb).and_return(10.0) runner.memory_available_to_spawn?.should be_false end end end end
Version data entries
4 entries across 4 versions & 1 rubygems