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.1.5 spec/support/shared/system/platforms/base.rb
cuboid-0.1.4 spec/support/shared/system/platforms/base.rb
cuboid-0.1.3 spec/support/shared/system/platforms/base.rb
cuboid-0.1.2 spec/support/shared/system/platforms/base.rb
cuboid-0.1.1 spec/support/shared/system/platforms/base.rb
cuboid-0.1.0 spec/support/shared/system/platforms/base.rb
cuboid-0.0.5 spec/support/shared/system/platforms/base.rb
cuboid-0.0.4 spec/support/shared/system/platforms/base.rb
cuboid-0.0.3 spec/support/shared/system/platforms/base.rb
cuboid-0.0.3alpha spec/support/shared/system/platforms/base.rb
cuboid-0.0.2alpha spec/support/shared/system/platforms/base.rb
cuboid-0.0.1alpha spec/support/shared/system/platforms/base.rb