Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed the masses of rm_rf & mkdir messages from the test suite

  • Loading branch information...
commit 50ec7e9db860fb7ff03320fd013fca360bb9ad29 1 parent 37fe42d
@mikel authored
Showing with 18 additions and 14 deletions.
  1. +2 −2 setup.rb
  2. +3 −3 test/test_mbox.rb
  3. +13 −9 test/test_port.rb
View
4 setup.rb
@@ -245,7 +245,7 @@ def initialize_defaults
end
if arg = RBCONFIG['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg }
- makeprog = arg.sub(/'/, '').split(/=/, 2)[1]
+ makeprog = arg.sub(/'/, '').split( /=/, 2)[1]
else
makeprog = 'make'
end
@@ -298,7 +298,7 @@ def load_config
#if File.file?(CONFIGFILE)
begin
File.foreach(CONFIGFILE) do |line|
- k, v = *line.split(/=/, 2)
+ k, v = *line.split( /=/, 2)
__send__("#{k}=",v.strip) #self[k] = v.strip
end
rescue Errno::ENOENT
View
6 test/test_mbox.rb
@@ -9,8 +9,8 @@ class MailboxTester < Test::Unit::TestCase
N = 5
def setup
- rm_rf MAILBOX
- mkdir MAILBOX
+ rm_rf(MAILBOX, :verbose => false)
+ mkdir(MAILBOX, :verbose => false)
N.downto(1) do |i|
File.open( "#{MAILBOX}/#{i}", 'w' ) {|f|
f.puts 'From: aamine'
@@ -35,7 +35,7 @@ def make_mails_older( diff )
end
def teardown
- rm_rf MAILBOX
+ rm_rf(MAILBOX, :verbose => false)
end
def test_s_new
View
22 test/test_port.rb
@@ -7,8 +7,8 @@ class FilePortTester < Test::Unit::TestCase
include FileUtils
def setup
- rm_rf 'tmp'
- mkdir 'tmp'
+ rm_rf('tmp', :verbose => false)
+ mkdir('tmp', :verbose => false)
5.times do |n|
File.open('tmp/' + n.to_s, 'w') {|f|
f.puts "file #{n}"
@@ -17,7 +17,7 @@ def setup
end
def teardown
- rm_rf 'tmp'
+ rm_rf('tmp', :verbose => false)
end
def test_s_new
@@ -336,8 +336,9 @@ class MhPortTester < Test::Unit::TestCase
include FileUtils
def setup
- rm_rf 'tmp'
- mkdir 'tmp'
+ rm_rf('tmp', :verbose => false)
+
+ mkdir('tmp', :verbose => false)
3.times do |n|
File.open( "tmp/#{n}", 'w' ) {|f|
f.puts 'From: Minero Aoki <aamine@loveruby.net>'
@@ -349,7 +350,8 @@ def setup
end
def teardown
- rm_rf 'tmp'
+ rm_rf('tmp', :verbose => false)
+
end
def test_flags
@@ -387,8 +389,9 @@ class MaildirPortTester < Test::Unit::TestCase
include FileUtils
def setup
- rm_rf 'tmp'
- mkdir 'tmp'
+ rm_rf('tmp', :verbose => false)
+
+ mkdir('tmp', :verbose => false)
3.times do |n|
File.open( "tmp/000.00#{n}.a", 'w' ) {|f|
f.puts 'From: Minero Aoki <aamine@loveruby.net>'
@@ -400,7 +403,8 @@ def setup
end
def teardown
- rm_rf 'tmp'
+ rm_rf('tmp', :verbose => false)
+
end
def test_flags
Please sign in to comment.
Something went wrong with that request. Please try again.