spec/config_spec.rb in sequenceserver-1.0.14 vs spec/config_spec.rb in sequenceserver-1.1.0.beta
- old
+ new
@@ -23,11 +23,10 @@
it 'has reasonable defaults' do
config = Config.new
config[:num_threads].should eq 1
config[:host].should eq '0.0.0.0'
config[:port].should eq 4567
- config.config_file.should eq File.expand_path('~/.sequenceserver.conf')
end
it 'symbolizes keys' do
config = Config.new('key' => 'value')
config.include?('key').should be_falsey
@@ -76,12 +75,13 @@
config[:port].should eq 4567
config[:num_threads].should eq 10
end
it 'merges arguments with defaults and values from config_file,' \
- 'arguments taking preecedence' do
+ 'arguments taking precedence' do
config = Config.new(:config_file => sample_config_file,
- :num_threads => 20)
+ :num_threads => 20, :job_lifetime => "INF")
config[:num_threads].should eq 20
+ config[:job_lifetime].should eq "INF"
end
end
end