From: cedlemo <nu...@co...> - 2017-12-06 09:45:12
|
cedlemo 2017-12-06 18:44:30 +0900 (Wed, 06 Dec 2017) New Revision: 75b9f6a9be386693cf536d7d412aef04837ca012 https://github.com/ruby-gnome2/ggit/commit/75b9f6a9be386693cf536d7d412aef04837ca012 Message: We can only get information of a config througth a snapshot Modified files: test/test-config.rb Modified: test/test-config.rb (+7 -5) =================================================================== --- test/test-config.rb 2017-12-06 18:30:36 +0900 (17d8754) +++ test/test-config.rb 2017-12-06 18:44:30 +0900 (97c15ba) @@ -26,15 +26,17 @@ class TestConfig < Test::Unit::TestCase def test_new_config_from_file conf = Ggit::Config.new(:file => @file) - user = conf.get_string("user.name") - assert_equal("name", user) + snapshot = conf.snapshot + user = snapshot.get_string("user.name") + assert_equal("jean-claude", user) end - def test_new_config + def test_new_config_add_file conf = Ggit::Config.new conf.add_file(@file, :local, true) - user = conf.get_string("user.name") - assert_equal("name", user) + snapshot = conf.snapshot + user = snapshot.get_string("user.name") + assert_equal("jean-claude", user) end def cleanup |