Sha256: 91e74be8ac634257668a75e8918f4a5cbd90e5400632f369d942d601284e9a0f

Contents?: true

Size: 1.45 KB

Versions: 63

Compression:

Stored size: 1.45 KB

Contents

RSpec.describe RubySMB::SMB2::BitField::ShareCapabilities do
  subject(:capabilities) { described_class.new }

  it { is_expected.to respond_to :asymmetric }
  it { is_expected.to respond_to :cluster }
  it { is_expected.to respond_to :scaleout }
  it { is_expected.to respond_to :continuous }
  it { is_expected.to respond_to :dfs }

  it 'is little endian' do
    expect(described_class.fields.instance_variable_get(:@hints)[:endian]).to eq :little
  end

  describe '#dfs' do
    it 'is a 1-bit flag' do
      expect(capabilities.dfs).to be_a BinData::Bit1
    end

    it_behaves_like 'bit field with one flag set', :dfs, 'V', 0x00000008
  end

  describe '#continuous' do
    it 'is a 1-bit flag' do
      expect(capabilities.continuous).to be_a BinData::Bit1
    end

    it_behaves_like 'bit field with one flag set', :continuous, 'V', 0x00000010
  end

  describe '#scaleout' do
    it 'is a 1-bit flag' do
      expect(capabilities.scaleout).to be_a BinData::Bit1
    end

    it_behaves_like 'bit field with one flag set', :scaleout, 'V', 0x00000020
  end

  describe '#cluster' do
    it 'is a 1-bit flag' do
      expect(capabilities.cluster).to be_a BinData::Bit1
    end

    it_behaves_like 'bit field with one flag set', :cluster, 'V', 0x00000040
  end

  describe '#asymmetric' do
    it 'is a 1-bit flag' do
      expect(capabilities.asymmetric).to be_a BinData::Bit1
    end

    it_behaves_like 'bit field with one flag set', :asymmetric, 'V', 0x00000080
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
ruby_smb-3.3.12 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.11 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.10 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.9 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.7 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.6 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.5 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.4 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.3 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.2 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.1 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.3.0 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.2.8 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.2.7 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.2.6 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.2.5 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.2.4 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.2.3 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.2.2 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb
ruby_smb-3.2.1 spec/lib/ruby_smb/smb2/bit_field/share_capabilities_spec.rb