Sha256: fd1a44e43306e0f656c50553f750c6d32d4951962022f4726c899890419527de

Contents?: true

Size: 889 Bytes

Versions: 8

Compression:

Stored size: 889 Bytes

Contents

require 'spec_helper'

describe Ratis::Config do
  it 'is valid' do
    expect(Ratis.config).to be_valid
  end

  context 'nil endpoint' do
    it 'is not valid' do
      expect(Ratis.config).to receive(:endpoint).at_least(:once).and_return(nil)
      expect(Ratis.config).to_not be_valid
    end
  end

  context 'empty endpoint' do
    it 'is not valid' do
      expect(Ratis.config).to receive(:endpoint).at_least(:once).and_return('')
      expect(Ratis.config).to_not be_valid
    end
  end

  context 'nil namespace' do
    it 'is not valid' do
      expect(Ratis.config).to receive(:namespace).at_least(:once).and_return(nil)
      expect(Ratis.config).to_not be_valid
    end
  end

  context 'empty namespace' do
    it 'is not valid' do
      expect(Ratis.config).to receive(:namespace).at_least(:once).and_return('')
      expect(Ratis.config).to_not be_valid
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ratis-3.6.6 spec/ratis/config_spec.rb
ratis-3.6.5 spec/ratis/config_spec.rb
ratis-3.6.4 spec/ratis/config_spec.rb
ratis-3.6.3 spec/ratis/config_spec.rb
ratis-3.6.2 spec/ratis/config_spec.rb
ratis-3.6.1 spec/ratis/config_spec.rb
ratis-3.6.0 spec/ratis/config_spec.rb
ratis-3.5.0 spec/ratis/config_spec.rb