Sha256: edce753228378b7398b1797b5aa88004b276fcd33723b69caff09c9787cecfc5
Contents?: true
Size: 1.62 KB
Versions: 2
Compression:
Stored size: 1.62 KB
Contents
require 'spec_helper' describe LitmusPaper::ConfigurationFile do describe "evaluate" do it "configures a service" do config_file = LitmusPaper::ConfigurationFile.new(TEST_CONFIG) config = config_file.evaluate config.services.has_key?('test').should == true end it "configures the port to listen on" do config_file = LitmusPaper::ConfigurationFile.new(TEST_CONFIG) config = config_file.evaluate config.port.should == 9293 end it "configures the data directory" do config_file = LitmusPaper::ConfigurationFile.new(TEST_CONFIG) config = config_file.evaluate config.data_directory.should == "/tmp/litmus_paper" end it "configures the cache_location" do config_file = LitmusPaper::ConfigurationFile.new(TEST_CONFIG) config = config_file.evaluate config.cache_location.should == "/tmp/litmus_paper_cache" end it "configures the cache_ttl" do config_file = LitmusPaper::ConfigurationFile.new(TEST_CONFIG) config = config_file.evaluate config.cache_ttl.should == -1 end end describe "include_files" do it "configures a dir glob of services" do config_file = LitmusPaper::ConfigurationFile.new(TEST_D_CONFIG) config = config_file.evaluate config.services.has_key?('test').should == true end it "defaults configuration options" do config_file = LitmusPaper::ConfigurationFile.new(TEST_D_CONFIG) config = config_file.evaluate config.services.has_key?('test').should == true config.port.should == 9292 config.data_directory.should == "/etc/litmus" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
litmus_paper-1.1.1 | spec/litmus_paper/configuration_file_spec.rb |
litmus_paper-1.1.0 | spec/litmus_paper/configuration_file_spec.rb |