test/unit/server_tests.rb in sanford-0.15.0 vs test/unit/server_tests.rb in sanford-0.15.1

- old
+ new

@@ -437,25 +437,16 @@ class ConfigurationTests < UnitTests include NsOptions::AssertMacros desc "Configuration" setup do - @orig_ip_env_var = ENV['SANFORD_IP'] - @orig_port_env_var = ENV['SANFORD_PORT'] - ENV.delete('SANFORD_IP') - ENV.delete('SANFORD_PORT') - @configuration = Configuration.new.tap do |c| c.name Factory.string c.ip Factory.string c.port Factory.integer end end - teardown do - ENV['SANFORD_IP'] = @orig_ip_env_var - ENV['SANFORD_PORT'] = @orig_port_env_var - end subject{ @configuration } should have_options :name, :ip, :port, :pid_file should have_options :receives_keep_alive should have_options :verbose_logging, :logger @@ -493,18 +484,9 @@ assert_equal [], subject.worker_sleep_procs assert_equal [], subject.worker_wakeup_procs assert_instance_of Sanford::Router, config.router assert_empty config.router.routes - end - - should "use env vars for its options if they are set" do - ENV['SANFORD_IP'] = Factory.string - ENV['SANFORD_PORT'] = Factory.integer.to_s - - config = Configuration.new - assert_equal ENV['SANFORD_IP'], config.ip - assert_equal ENV['SANFORD_PORT'].to_i, config.port end should "not be valid by default" do assert_false subject.valid? end