Sha256: 809a451830b20bef1479a8d763a9826f4d4b43e3ca852d5919a2eb2a6b0d2fcd

Contents?: true

Size: 823 Bytes

Versions: 32

Compression:

Stored size: 823 Bytes

Contents

shared_examples_for 'Cuboid::System::Platforms::Base' do
    subject { described_class.new }

    describe '#disk_directory' do
        it "delegates to #{Cuboid::OptionGroups::Paths}#os_tmpdir" do
            expect(subject.disk_directory).to be Cuboid::Options.paths.os_tmpdir
        end
    end

    describe '#disk_space_for_process' do
        it 'returns bytes of disk space used by the process' do
            expect(Cuboid::Support::Database::Base).to receive(:disk_space_for).with(123).and_return(1000)

            expect(subject.disk_space_for_process( 123 )).to eq 1000
        end
    end

    describe '#cpu_count' do
        it 'returns the amount of CPUs' do
            expect(Concurrent).to receive(:processor_count).and_return(99)
            expect(subject.cpu_count).to eq 99
        end
    end

end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
cuboid-0.2.11 spec/support/shared/system/platforms/base.rb
cuboid-0.2.10 spec/support/shared/system/platforms/base.rb
cuboid-0.2.9 spec/support/shared/system/platforms/base.rb
cuboid-0.2.8 spec/support/shared/system/platforms/base.rb
cuboid-0.2.7 spec/support/shared/system/platforms/base.rb
cuboid-0.2.6 spec/support/shared/system/platforms/base.rb
cuboid-0.2.5 spec/support/shared/system/platforms/base.rb
cuboid-0.2.4.2 spec/support/shared/system/platforms/base.rb
cuboid-0.2.4.1 spec/support/shared/system/platforms/base.rb
cuboid-0.2.4 spec/support/shared/system/platforms/base.rb
cuboid-0.2.3 spec/support/shared/system/platforms/base.rb
cuboid-0.2.2 spec/support/shared/system/platforms/base.rb
cuboid-0.2.1 spec/support/shared/system/platforms/base.rb
cuboid-0.2 spec/support/shared/system/platforms/base.rb
cuboid-0.1.9.1 spec/support/shared/system/platforms/base.rb
cuboid-0.1.9 spec/support/shared/system/platforms/base.rb
cuboid-0.1.8 spec/support/shared/system/platforms/base.rb
cuboid-0.1.7 spec/support/shared/system/platforms/base.rb
cuboid-0.1.6.1 spec/support/shared/system/platforms/base.rb
cuboid-0.1.6 spec/support/shared/system/platforms/base.rb