Sha256: ab91024a6f8a592b7a168e9049bf68570d6ee84c420eed6dab283f2a3039cc94

Contents?: true

Size: 774 Bytes

Versions: 25

Compression:

Stored size: 774 Bytes

Contents

require 'spec/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.indexes << 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

25 entries across 25 versions & 2 rubygems

Version Path
freelancing-god-riddle-0.9.8.1533.2 spec/unit/configuration_spec.rb
freelancing-god-riddle-0.9.8.1533.3 spec/unit/configuration_spec.rb
freelancing-god-riddle-0.9.8.1533.4 spec/unit/configuration_spec.rb
freelancing-god-riddle-0.9.8.1533.5 spec/unit/configuration_spec.rb
freelancing-god-riddle-0.9.8.1533.7 spec/unit/configuration_spec.rb
freelancing-god-riddle-0.9.8.1533.8 spec/unit/configuration_spec.rb
freelancing-god-riddle-0.9.8.1533.9 spec/unit/configuration_spec.rb
riddle-1.2.2 spec/unit/configuration_spec.rb
riddle-1.2.1 spec/unit/configuration_spec.rb
riddle-1.2.0 spec/unit/configuration_spec.rb
riddle-1.1.0 spec/unit/configuration_spec.rb
riddle-1.0.12 spec/unit/configuration_spec.rb
riddle-1.0.11 spec/unit/configuration_spec.rb
riddle-1.0.10 spec/unit/configuration_spec.rb
riddle-1.0.9 spec/unit/configuration_spec.rb
riddle-1.0.8 spec/unit/configuration_spec.rb
riddle-1.0.7 spec/unit/configuration_spec.rb
riddle-1.0.6 spec/unit/configuration_spec.rb
riddle-1.0.5 spec/unit/configuration_spec.rb
riddle-1.0.4 spec/unit/configuration_spec.rb