From 88023701a88c1113e4874c193d26c6bf21fad383 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Sat, 4 Aug 2007 22:19:18 +0000 Subject: [PATCH] misc noise cleanup in specs. use bin/completeness to find missing specs rather than warns. --- spec/core/dir_spec.rb | 14 +++++--------- spec/core/errno_spec.rb | 2 -- spec/core/filetest_spec.rb | 2 -- spec/core/float_spec.rb | 2 +- spec/core/gc_spec.rb | 2 -- spec/core/marshal_spec.rb | 3 --- spec/core/math_spec.rb | 2 +- spec/core/method_spec.rb | 2 -- spec/core/numeric_spec.rb | 4 +--- spec/core/signal_spec.rb | 2 -- spec/core/threadgroup_spec.rb | 2 +- spec/core/unboundmethod_spec.rb | 2 -- 12 files changed, 9 insertions(+), 30 deletions(-) diff --git a/spec/core/dir_spec.rb b/spec/core/dir_spec.rb index 31f8534c75..5740c62e21 100644 --- a/spec/core/dir_spec.rb +++ b/spec/core/dir_spec.rb @@ -46,8 +46,7 @@ $nonexisting = $nonexisting.succ end - -def setup_mock_fs() +def setup_mock_fs system "mkdir -p '#{$mockdir}'; mkdir -p '#{$mockdir}/subdir_one'; mkdir -p '#{$mockdir}/subdir_two'; @@ -73,20 +72,17 @@ def setup_mock_fs() touch '#{$mockdir}/deeply/nested/directory/structure/.ext';" end -#def teardown_mock_fs() -#end +def teardown_mock_fs + system "rm -r #{$mockdir}" +end -warn "Running Dir specs will leave you with a #{$mockdir}, feel free to delete it." setup_mock_fs # Try to clean up at_exit do - system "rm -r #{$mockdir}" + teardown_mock_fs end -warn 'Dir specs are incomplete. Please add corner cases.' - - context 'Using Dir to move around the filesystem' do specify 'Dir.pwd and Dir.getwd return the current working directory' do Dir.pwd.should == `pwd`.chomp diff --git a/spec/core/errno_spec.rb b/spec/core/errno_spec.rb index 3dc85b0c99..91cd5b0637 100644 --- a/spec/core/errno_spec.rb +++ b/spec/core/errno_spec.rb @@ -1,3 +1 @@ require File.dirname(__FILE__) + '/../spec_helper' - -warn 'No Errno specs' diff --git a/spec/core/filetest_spec.rb b/spec/core/filetest_spec.rb index c1516777f5..91cd5b0637 100644 --- a/spec/core/filetest_spec.rb +++ b/spec/core/filetest_spec.rb @@ -1,3 +1 @@ require File.dirname(__FILE__) + '/../spec_helper' - -warn 'No FileTest specs' diff --git a/spec/core/float_spec.rb b/spec/core/float_spec.rb index f8ff42a801..19f589185d 100644 --- a/spec/core/float_spec.rb +++ b/spec/core/float_spec.rb @@ -4,7 +4,7 @@ # divmod, eql?, finite?, floor, hash, infinite?, modulo, nan?, round, # to_f, to_i, to_int, to_s, truncate, zero? -TOLERANCE = 0.0003 +TOLERANCE = 0.00003 unless Object.const_defined?(:TOLERANCE) describe "Float#CONSTANTS" do specify "the DIG value is 15" do diff --git a/spec/core/gc_spec.rb b/spec/core/gc_spec.rb index 11672fa117..91cd5b0637 100644 --- a/spec/core/gc_spec.rb +++ b/spec/core/gc_spec.rb @@ -1,3 +1 @@ require File.dirname(__FILE__) + '/../spec_helper' - -warn 'No GC specs' diff --git a/spec/core/marshal_spec.rb b/spec/core/marshal_spec.rb index 6f17ce414e..91cd5b0637 100644 --- a/spec/core/marshal_spec.rb +++ b/spec/core/marshal_spec.rb @@ -1,4 +1 @@ require File.dirname(__FILE__) + '/../spec_helper' - -warn 'No Marshal specs!' - diff --git a/spec/core/math_spec.rb b/spec/core/math_spec.rb index 62fad1e9ee..97fbc60bae 100644 --- a/spec/core/math_spec.rb +++ b/spec/core/math_spec.rb @@ -10,7 +10,7 @@ # exp exp exp! frexp ldexp sinh sinh sinh! tanh tanh tanh! -TOLERANCE=0.00003 +TOLERANCE=0.00003 unless Object.const_defined?(:TOLERANCE) class IncludesMath include Math diff --git a/spec/core/method_spec.rb b/spec/core/method_spec.rb index e23aba2efe..91cd5b0637 100644 --- a/spec/core/method_spec.rb +++ b/spec/core/method_spec.rb @@ -1,3 +1 @@ require File.dirname(__FILE__) + '/../spec_helper' - -warn 'No Method specs' diff --git a/spec/core/numeric_spec.rb b/spec/core/numeric_spec.rb index a121be6367..8e329240b7 100644 --- a/spec/core/numeric_spec.rb +++ b/spec/core/numeric_spec.rb @@ -1,6 +1,6 @@ require File.dirname(__FILE__) + '/../spec_helper' -TOLERANCE = 0.00003 +TOLERANCE = 0.00003 unless Object.const_defined?(:TOLERANCE) # TODO <=> angle arg conj conjugate # im imag image polar real singleton_method_added @@ -686,5 +686,3 @@ def coerce(other) should_raise(ArgumentError){ @integer.coerce } end end - -warn ' Numeric have only a few specs' \ No newline at end of file diff --git a/spec/core/signal_spec.rb b/spec/core/signal_spec.rb index 12e9a8b957..91cd5b0637 100644 --- a/spec/core/signal_spec.rb +++ b/spec/core/signal_spec.rb @@ -1,3 +1 @@ require File.dirname(__FILE__) + '/../spec_helper' - -warn 'No Signal specs' diff --git a/spec/core/threadgroup_spec.rb b/spec/core/threadgroup_spec.rb index d934b219c6..91cd5b0637 100644 --- a/spec/core/threadgroup_spec.rb +++ b/spec/core/threadgroup_spec.rb @@ -1 +1 @@ -warn 'No ThreadGroup specs' +require File.dirname(__FILE__) + '/../spec_helper' diff --git a/spec/core/unboundmethod_spec.rb b/spec/core/unboundmethod_spec.rb index c44f6c2e57..91cd5b0637 100644 --- a/spec/core/unboundmethod_spec.rb +++ b/spec/core/unboundmethod_spec.rb @@ -1,3 +1 @@ require File.dirname(__FILE__) + '/../spec_helper' - -warn 'No UnboundMethod specs'