cedlemo 2017-12-06 22:34:56 +0900 (Wed, 06 Dec 2017)
New Revision: ac93f6227c2daebd85c42b8803cd3f22d93bf491
https://github.com/ruby-gnome2/ggit/commit/ac93f6227c2daebd85c42b8803cd3f22d93bf491
Message:
Add test for Ggit::Config.set_string
Modified files:
test/test-config.rb
Modified: test/test-config.rb (+11 -0)
===================================================================
--- test/test-config.rb 2017-12-06 18:44:50 +0900 (97c15ba)
+++ test/test-config.rb 2017-12-06 22:34:56 +0900 (c114f22)
@@ -39,6 +39,17 @@ class TestConfig < Test::Unit::TestCase
assert_equal("jean-claude", user)
end
+ def test_config_add_new_value
+ conf = Ggit::Config.new
+ conf.add_file(@file, :local, true)
+ conf.set_string("core.editor", "vim")
+ conf = Ggit::Config.new
+ conf.add_file(@file, :local, true)
+ snapshot = conf.snapshot
+ editor = snapshot.get_string("core.editor")
+ assert_equal("vim", editor)
+ end
+
def cleanup
FileUtils.rm_rf("#{@path}/config")
end
|