Sha256: 44d0746c5979baca8be7f03c630e8079775cd82c270479812d85437c9c7de7e9
Contents?: true
Size: 1018 Bytes
Versions: 3
Compression:
Stored size: 1018 Bytes
Contents
require 'assert' class Sanford::Host::Configuration class BaseTest < Assert::Context desc "Sanford::Host::Configuration" setup do @configuration = Sanford::Host::Configuration.new(EmptyHost.instance) end subject{ @configuration } should have_instance_methods :name, :ip, :port, :pid_dir, :logger, :verbose_logging, :logger, :error_proc should "default name to the class name of the host" do assert_equal 'EmptyHost', subject.name end should "default ip to 0.0.0.0" do assert_equal '0.0.0.0', subject.ip end should "not default the port" do assert_nil subject.port end should "default pid_dir to the current working directory" do assert_equal Pathname.new(Dir.pwd), subject.pid_dir end should "default logger to a null logger" do assert_instance_of Sanford::NullLogger, subject.logger end should "default verbose_logging to true" do assert_equal true, subject.verbose_logging end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sanford-0.4.0 | test/unit/host_configuration_test.rb |
sanford-0.3.0 | test/unit/host_configuration_test.rb |
sanford-0.2.0 | test/unit/host_configuration_test.rb |