Skip to content

Commit

Permalink
testing fix for #20
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioRuiz committed Feb 24, 2020
1 parent 807ef46 commit 14b5f08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion spec/nice_http/logs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/nice_http/stats_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 14b5f08

Please sign in to comment.