Skip to content

Commit

Permalink
misc noise cleanup in specs. use bin/completeness to find missing spe…
Browse files Browse the repository at this point in the history
…cs rather than warns.
  • Loading branch information
brixen committed Aug 4, 2007
1 parent 3d960a0 commit 8802370
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 30 deletions.
14 changes: 5 additions & 9 deletions spec/core/dir_spec.rb
Expand Up @@ -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';
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions spec/core/errno_spec.rb
@@ -1,3 +1 @@
require File.dirname(__FILE__) + '/../spec_helper'

warn 'No Errno specs'
2 changes: 0 additions & 2 deletions spec/core/filetest_spec.rb
@@ -1,3 +1 @@
require File.dirname(__FILE__) + '/../spec_helper'

warn 'No FileTest specs'
2 changes: 1 addition & 1 deletion spec/core/float_spec.rb
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions spec/core/gc_spec.rb
@@ -1,3 +1 @@
require File.dirname(__FILE__) + '/../spec_helper'

warn 'No GC specs'
3 changes: 0 additions & 3 deletions spec/core/marshal_spec.rb
@@ -1,4 +1 @@
require File.dirname(__FILE__) + '/../spec_helper'

warn 'No Marshal specs!'

2 changes: 1 addition & 1 deletion spec/core/math_spec.rb
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions spec/core/method_spec.rb
@@ -1,3 +1 @@
require File.dirname(__FILE__) + '/../spec_helper'

warn 'No Method specs'
4 changes: 1 addition & 3 deletions 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
Expand Down Expand Up @@ -686,5 +686,3 @@ def coerce(other)
should_raise(ArgumentError){ @integer.coerce }
end
end

warn ' Numeric have only a few specs'
2 changes: 0 additions & 2 deletions spec/core/signal_spec.rb
@@ -1,3 +1 @@
require File.dirname(__FILE__) + '/../spec_helper'

warn 'No Signal specs'
2 changes: 1 addition & 1 deletion spec/core/threadgroup_spec.rb
@@ -1 +1 @@
warn 'No ThreadGroup specs'
require File.dirname(__FILE__) + '/../spec_helper'
2 changes: 0 additions & 2 deletions spec/core/unboundmethod_spec.rb
@@ -1,3 +1 @@
require File.dirname(__FILE__) + '/../spec_helper'

warn 'No UnboundMethod specs'

0 comments on commit 8802370

Please sign in to comment.