Sha256: 8733af3097e10517aa7e0a4c955eb608bbeba7acd9abfef9802100b3a74c8efc

Contents?: true

Size: 749 Bytes

Versions: 15

Compression:

Stored size: 749 Bytes

Contents

require 'spec_helper'

describe Riddle::Configuration do
  it "should render all given indexes and sources, plus the indexer and search sections" do
    config = Riddle::Configuration.new

    config.searchd.port = 3312
    config.searchd.pid_file = "file.pid"

    source = Riddle::Configuration::XMLSource.new("src1", "xmlpipe")
    source.xmlpipe_command = "ls /dev/null"

    index = Riddle::Configuration::Index.new("index1")
    index.path = "/path/to/index1"
    index.sources << source

    config.indices << index
    generated_conf = config.render

    generated_conf.should match(/index index1/)
    generated_conf.should match(/source src1/)
    generated_conf.should match(/indexer/)
    generated_conf.should match(/searchd/)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
riddle-2.1.0 spec/unit/configuration_spec.rb
riddle-2.0.0 spec/unit/configuration_spec.rb
riddle-1.5.12 spec/unit/configuration_spec.rb
riddle-1.5.11 spec/unit/configuration_spec.rb
riddle-1.5.10 spec/unit/configuration_spec.rb
riddle-1.5.9 spec/unit/configuration_spec.rb
riddle-1.5.8 spec/unit/configuration_spec.rb
riddle-1.5.7 spec/unit/configuration_spec.rb
riddle-1.5.6 spec/unit/configuration_spec.rb
riddle-1.5.5 spec/unit/configuration_spec.rb
riddle-1.5.4 spec/unit/configuration_spec.rb
riddle-1.5.3 spec/unit/configuration_spec.rb
riddle-1.5.2 spec/unit/configuration_spec.rb
riddle-1.5.1 spec/unit/configuration_spec.rb
riddle-1.5.0 spec/unit/configuration_spec.rb