From 7b27b2d3064bd4e288323ec900096dbc6fbfc8ee Mon Sep 17 00:00:00 2001 From: Michal Filka Date: Tue, 31 Jul 2012 12:46:14 +0200 Subject: [PATCH] Replaced system call by appropriate FileUtils methods --- libconfigagent/test/test_sysconfig.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libconfigagent/test/test_sysconfig.rb b/libconfigagent/test/test_sysconfig.rb index 7d27a68..5679559 100644 --- a/libconfigagent/test/test_sysconfig.rb +++ b/libconfigagent/test/test_sysconfig.rb @@ -64,20 +64,18 @@ def test_stability test_file = TEST_WORKING_DIR + TEST_STABILITY_IN_FILE orig_file = @data + TEST_STABILITY_IN_FILE - res = system( "cp #{orig_file} #{test_file}") - - assert( res) + FileUtils.cp( orig_file, test_file) # perform the test agent = ConfigAgent::Sysconfig.new( { :path => test_file }) agent.write( agent.read({})) - res = system( "diff #{test_file} #{orig_file}") + res = FileUtils.compare_file( test_file, orig_file) assert( res) # cleanup - system( "rm #{test_file}") + FileUtils.rm( test_file) end def test_new_value_write