spec/devdnsd/configuration_spec.rb in devdnsd-1.1.10 vs spec/devdnsd/configuration_spec.rb in devdnsd-1.5.0
- old
+ new
@@ -1,29 +1,15 @@
# encoding: utf-8
#
-# This file is part of the devdns gem. Copyright (C) 2012 and above Shogun <shogun_panda@me.com>.
+# This file is part of the devdnsd gem. Copyright (C) 2012 and above Shogun <shogun_panda@me.com>.
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
#
require "spec_helper"
require "tempfile"
describe DevDNSd::Configuration do
- class DevDNSd::Application
- def logger
- Bovem::Logger.new("/dev/null")
- end
- end
-
- let(:log_file) { "/tmp/devdnsd-test-log-#{Time.now.strftime("%Y%m%d-%H:%M:%S")}" }
-
- let(:new_application) {
- app = DevDNSd::Application.new({:log_file => log_file})
- app.logger = Bovem::Logger.create("/dev/null", Bovem::Logger::DEBUG)
- app
- }
-
describe "#initialize" do
it "sets default arguments and rules" do
config = DevDNSd::Configuration.new
expect(config.address).to eq("0.0.0.0")
expect(config.port).to eq(7771)
@@ -45,6 +31,6 @@
it "should reject a bad rule" do
config = DevDNSd::Configuration.new
expect { config.add_rule("RULE") }.to raise_error(DevDNSd::Errors::InvalidRule)
end
end
-end
\ No newline at end of file
+end