Sha256: af66d4d4674edd59b9668383deac1bbfff44f392726d064392618040747e1025

Contents?: true

Size: 783 Bytes

Versions: 16

Compression:

Stored size: 783 Bytes

Contents

require 'spec_helper'

describe Riddle::Configuration::Indexer do
  it "should always be valid" do
    indexer = Riddle::Configuration::Indexer.new
    indexer.should be_valid
  end
  
  it "should support Sphinx's indexer settings" do
    settings = %w( mem_limit max_iops max_iosize )
    indexer = Riddle::Configuration::Indexer.new
    
    settings.each do |setting|
      indexer.should respond_to(setting.to_sym)
      indexer.should respond_to("#{setting}=".to_sym)
    end
  end
  
  it "should render a correct configuration" do
    indexer = Riddle::Configuration::Indexer.new
    
    indexer.render.should == <<-INDEXER
indexer
{
}
    INDEXER
    
    indexer.mem_limit = "32M"
    indexer.render.should == <<-INDEXER
indexer
{
  mem_limit = 32M
}
    INDEXER
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
riddle-1.5.10 spec/unit/configuration/indexer_spec.rb
riddle-1.5.9 spec/unit/configuration/indexer_spec.rb
riddle-1.5.8 spec/unit/configuration/indexer_spec.rb
riddle-1.5.7 spec/unit/configuration/indexer_spec.rb
riddle-1.5.6 spec/unit/configuration/indexer_spec.rb
riddle-1.5.5 spec/unit/configuration/indexer_spec.rb
riddle-1.5.4 spec/unit/configuration/indexer_spec.rb
riddle-1.5.3 spec/unit/configuration/indexer_spec.rb
riddle-1.5.2 spec/unit/configuration/indexer_spec.rb
riddle-1.5.1 spec/unit/configuration/indexer_spec.rb
riddle-1.5.0 spec/unit/configuration/indexer_spec.rb
riddle-1.4.0 spec/unit/configuration/indexer_spec.rb
riddle-1.3.3 spec/unit/configuration/indexer_spec.rb
riddle-1.3.2 spec/unit/configuration/indexer_spec.rb
riddle-1.3.1 spec/unit/configuration/indexer_spec.rb
riddle-1.3.0 spec/unit/configuration/indexer_spec.rb