From 14b5f08311eb4c36d451b905577de7dd1614d826 Mon Sep 17 00:00:00 2001 From: MarioRuiz Date: Mon, 24 Feb 2020 19:03:48 +0000 Subject: [PATCH] testing fix for #20 --- spec/nice_http/logs_spec.rb | 5 ++++- spec/nice_http/stats_spec.rb | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/nice_http/logs_spec.rb b/spec/nice_http/logs_spec.rb index 1ccc9a1..0ee8b28 100644 --- a/spec/nice_http/logs_spec.rb +++ b/spec/nice_http/logs_spec.rb @@ -127,7 +127,10 @@ end it 'logs data to relative path starting by name' do - Dir.glob("./spec/nice_http/*.log").each { |file| File.delete(file) } + #Dir.glob("./spec/nice_http/*.log").each { |file| File.delete(file) } + if File.exists?('./spec/nice_http/nice_http_example.log') + File.delete('./spec/nice_http/nice_http_example.log') + end klass.log = 'nice_http_example.log' klass.new("https://example.com") expect(File.exist?('./spec/nice_http/nice_http_example.log')).to eq true diff --git a/spec/nice_http/stats_spec.rb b/spec/nice_http/stats_spec.rb index 14d23d9..a5dac9d 100644 --- a/spec/nice_http/stats_spec.rb +++ b/spec/nice_http/stats_spec.rb @@ -200,8 +200,8 @@ it 'generates the files when no file_name supplied' do klass.create_stats = true klass.log = './nice_http_tmp.log' - File.delete(klass.log) if File.exist?(klass.log) - File.delete('./nice_http_tmp_stats_all.yaml') if File.exist?('./nice_http_tmp_stats_all.yaml') + #File.delete(klass.log) if File.exist?(klass.log) + #File.delete('./nice_http_tmp_stats_all.yaml') if File.exist?('./nice_http_tmp_stats_all.yaml') http = klass.new("http://example.com") resp = http.get "/" klass.save_stats()