Sha256: 90e93075ad4c65dbbbea31f8b814e3da2c306c165745b4365e441e8fd3715dc6

Contents?: true

Size: 733 Bytes

Versions: 17

Compression:

Stored size: 733 Bytes

Contents

require "filetree"
require_relative "../../spec_helper"

describe Rsense::Server::Config do
  before do
    @path = "spec/fixtures/config_fixture"
    @conf_path = FileTree.new("spec/fixtures/config_fixture/.rsense").expand_path
    @config = Rsense::Server::Config.new
  end

  it "searches for a config file" do
    search = @config.search(@path)
    search.to_s.must_match(/spec\/fixtures\/config_fixture\/\.rsense/)
    @config.searched.size.must_equal(1)
  end

  it "sets the port" do
    options = @config.options(@conf_path)
    @config.port.must_equal(123456)
  end

  it "sets ignores" do
    options = @config.options(@conf_path)
    @config.ignores.must_include(".foo")
    @config.ignores.must_include(".bar")
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rsense-server-0.5.18 spec/rsense/server/config_spec.rb
rsense-server-0.5.17 spec/rsense/server/config_spec.rb
rsense-server-0.5.16 spec/rsense/server/config_spec.rb
rsense-server-0.5.15 spec/rsense/server/config_spec.rb
rsense-server-0.5.14 spec/rsense/server/config_spec.rb
rsense-server-0.5.13 spec/rsense/server/config_spec.rb
rsense-server-0.5.12 spec/rsense/server/config_spec.rb
rsense-server-0.5.11 spec/rsense/server/config_spec.rb
rsense-server-0.5.10 spec/rsense/server/config_spec.rb
rsense-server-0.5.9 spec/rsense/server/config_spec.rb
rsense-server-0.5.8 spec/rsense/server/config_spec.rb
rsense-server-0.5.7 spec/rsense/server/config_spec.rb
rsense-server-0.5.6 spec/rsense/server/config_spec.rb
rsense-server-0.5.5 spec/rsense/server/config_spec.rb
rsense-server-0.5.4 spec/rsense/server/config_spec.rb
rsense-server-0.5.2 spec/rsense/server/config_spec.rb
rsense-server-0.5.0 spec/rsense/server/config_spec.rb