From 5bcce7a1f1659870fb44977fad7f4e8afe180377 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Mon, 15 Apr 2013 00:41:46 +0200 Subject: [PATCH] Fix unit tests for Configuration#backwards_compatibilize --- test/test_configuration.rb | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/test_configuration.rb b/test/test_configuration.rb index 6e4675c6..f94b159a 100644 --- a/test/test_configuration.rb +++ b/test/test_configuration.rb @@ -50,11 +50,21 @@ class TestConfiguration < Test::Unit::TestCase end context "#backwards_compatibilize" do setup do - @config = Configuration[{"auto" => true}] + @config = Configuration[{ + "auto" => true, + "watch" => true, + "server" => true + }] end - should "create 'watch' key for 'auto'" do - assert @config.backwards_compatibilize.has_key? "watch" - assert_equal true, @config.backwards_compatibilize["watch"] + should "unset 'auto' and 'watch'" do + assert @config.has_key?("auto") + assert @config.has_key?("watch") + assert !@config.backwards_compatibilize.has_key?("auto") + assert !@config.backwards_compatibilize.has_key?("watch") + end + should "unset 'server'" do + assert @config.has_key?("server") + assert !@config.backwards_compatibilize.has_key?("server") end end context "loading configuration" do