spec/unit/thinking_sphinx/configuration_spec.rb in freelancing-god-thinking-sphinx-1.1.18 vs spec/unit/thinking_sphinx/configuration_spec.rb in freelancing-god-thinking-sphinx-1.1.19

- old
+ new

@@ -100,9 +100,28 @@ ThinkingSphinx::Configuration.instance.send(:parse_config) ThinkingSphinx::Configuration.instance.bin_path.should match(/\/$/) end end + describe "index options" do + before :each do + @settings = { + "development" => {"disable_range" => true} + } + + open("#{RAILS_ROOT}/config/sphinx.yml", "w") do |f| + f.write YAML.dump(@settings) + end + + @config = ThinkingSphinx::Configuration.instance + @config.send(:parse_config) + end + + it "should collect disable_range" do + @config.index_options[:disable_range].should be_true + end + end + it "should insert set index options into the configuration file" do config = ThinkingSphinx::Configuration.instance ThinkingSphinx::Configuration::IndexOptions.each do |option| config.index_options[option.to_sym] = "something" config.build \ No newline at end of file