Sha256: 7faaba63a1f49d113d55d9d783803423fdb28dd26fed2f65b3d1dfd8f21a9c76

Contents?: true

Size: 864 Bytes

Versions: 8

Compression:

Stored size: 864 Bytes

Contents

require File.expand_path('spec_helper', File.dirname(__FILE__))

describe Sunspot::Rails::Server do
  before :each do
    @server = Sunspot::Rails::Server.new
    @config = Sunspot::Rails::Configuration.new
    @server.stub(:configuration){ @config }
    @solr_home = File.join(@config.solr_home)
  end

  it "sets the correct Solr home" do
    @server.solr_home.should == @solr_home
  end

  it "sets the correct Solr PID path" do
    @server.pid_path.should == File.join(@server.pid_dir, 'sunspot-solr-test.pid')
  end

  it "sets the correct port" do
    @server.port.should == 8983
  end

  it "sets the log level using configuration" do
    @config.stub(:log_level){ 'WARNING' }
    @server.log_level.should == "WARNING"
  end

  it "sets the correct log file" do
    @server.log_file.should == File.join(Rails.root, 'log', 'sunspot-solr-test.log')
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/sunspot_rails-2.2.7/spec/server_spec.rb
sunspot_rails-2.2.7 spec/server_spec.rb
sunspot_rails-2.2.6 spec/server_spec.rb
sunspot_rails-2.2.5 spec/server_spec.rb
sunspot_rails-2.2.4 spec/server_spec.rb
sunspot_rails-2.2.3 spec/server_spec.rb
sunspot_rails-2.2.2 spec/server_spec.rb
sunspot_rails-2.2.1 spec/server_spec.rb