Sha256: 6176477d2e239b1dab95abaae00c3853e7e2b804b2856ac883a45d1be1c7f8a6

Contents?: true

Size: 981 Bytes

Versions: 63

Compression:

Stored size: 981 Bytes

Contents

RSpec.describe RubySMB::SMB1::BitField::FileStatusFlags do
  subject(:options) { described_class.new }

  it { is_expected.to respond_to :reparse_tag }
  it { is_expected.to respond_to :no_substreams }
  it { is_expected.to respond_to :no_eas }

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

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

    it_behaves_like 'bit field with one flag set', :reparse_tag, 'v', 0x0004
  end

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

    it_behaves_like 'bit field with one flag set', :no_substreams, 'v', 0x0002
  end

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

    it_behaves_like 'bit field with one flag set', :no_eas, 'v', 0x0001
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

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