Sha256: e7438ac0297a35fa2cd97bf1a71ae50ff726285fb5586f80dfc9df3c9f347bd9
Contents?: true
Size: 1.56 KB
Versions: 12
Compression:
Stored size: 1.56 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') # require File.expand_path(File.dirname(__FILE__) + '/../../lib/hydra/hydra_testing_server.rb') describe Hydra::TestingServer do it "should be configurable with params hash" do jetty_params = { :quiet => false, :jetty_home => "/path/to/jetty", :jetty_port => 8888, :solr_home => '/path/to/solr', :fedora_home => '/path/to/fedora' } ts = Hydra::TestingServer.configure(jetty_params) ts.quiet.should == false ts.jetty_home.should == "/path/to/jetty" ts.port.should == 8888 ts.solr_home.should == '/path/to/solr' ts.fedora_home.should == '/path/to/fedora' end it "should be configurable with default values" do ts = Hydra::TestingServer.configure ts.quiet.should == true ts.jetty_home.should == File.join(::Rails.root.to_s, "jetty") ts.port.should == 8888 ts.solr_home.should == File.join(ts.jetty_home, "solr" ) ts.fedora_home.should == File.join(ts.jetty_home, "fedora","default") end it "should override nil params with defaults" do jetty_params = { :quiet => false, :jetty_home => nil, :jetty_port => 8888, :solr_home => '/path/to/solr', :fedora_home => nil } ts = Hydra::TestingServer.configure(jetty_params) ts.quiet.should == false ts.jetty_home.should == File.join(::Rails.root.to_s, "jetty") ts.port.should == 8888 ts.solr_home.should == "/path/to/solr" ts.fedora_home.should == File.join(ts.jetty_home, "fedora","default") end end
Version data entries
12 entries across 12 versions & 1 rubygems