Sha256: e1fad250bb8f28353998d811567f70b91759fe674c8b4ab86ab47525e829db30
Contents?: true
Size: 1.32 KB
Versions: 1
Compression:
Stored size: 1.32 KB
Contents
require "spec_helper" require "partition_shared_examples" describe "DOS Partition" do let(:extpected_num_partitions) { 2 } let(:expected_partition_class) { VirtDisk::PartitionType::DosPartition } let(:per_partition_values) do [ { :ptype => 4, :block_size => 512, :start_lba => 63, :end_lba => 575, :start_byte_addr => 32256, :end_byte_addr => 294400, :size => 262144 }, { :ptype => 4, :block_size => 512, :start_lba => 575, :end_lba => 2048, :start_byte_addr => 294400, :end_byte_addr => 1048576, :size => 754176 } ] end data_dir = File.join(__dir__, "data") dos_partition_file = File.join(data_dir, "dos_partition.img") file_mod = VirtDisk::FileIo.new(dos_partition_file) disk = VirtDisk::Disk.new(file_mod) it "should return an array of the expected length" do expect(VirtDisk::PartitionType.partition_probe(disk).length).to eq(extpected_num_partitions) end VirtDisk::PartitionType.partition_probe(disk).each do |part| describe "Partition: #{part.pnum}" do before(:each) do @partition = part end it_should_behave_like "common_partition" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
virt_disk-0.0.1 | spec/dos_partition_spec.rb |