Sha256: 2f408016961a95f9feba6013d1824f7376f939d19b7f05f0790bc8126b51cf44

Contents?: true

Size: 1005 Bytes

Versions: 39

Compression:

Stored size: 1005 Bytes

Contents

RSpec.describe RubySMB::Server do
  before(:each) do
    allow(::TCPServer).to receive(:new).and_return(::TCPServer.new(0))
  end

  it { is_expected.to respond_to :dialects }
  it { is_expected.to respond_to :gss_provider }
  it { is_expected.to respond_to :guid }

  describe '#initialize' do
    it 'should bind to TCP port 445 by default' do
      expect(::TCPServer).to receive(:new).with(445).and_return(::TCPServer.new(0))
      described_class.new
    end

    it 'should create a new NTLM GSS provider by default' do
      expect(RubySMB::Gss::Provider::NTLM).to receive(:new).and_call_original
      described_class.new
    end

    it 'should generate a random 16-byte GUID' do
      server_guid = described_class.new.guid
      expect(server_guid).to be_a String
      expect(server_guid.length).to eq 16
      expect(server_guid).to_not eq described_class.new.guid
    end

    it 'should support some dialects' do
      expect(described_class.new.dialects).to_not be_empty
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

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