From 648b4b9b6677a90caf7feacefaaef3e2b4a28a7f Mon Sep 17 00:00:00 2001 From: David Miani Date: Thu, 21 Jul 2011 19:21:32 +1000 Subject: [PATCH] added test-unit gem to Gemfile. Removed duplicate tests --- .gitignore | 1 + Gemfile | 4 ++++ Gemfile.lock | 2 ++ test/fakefs_test.rb | 8 -------- test/fs_tests_failing.rb | 5 ++--- test/passing_fs_test.rb | 2 +- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 144394f3..b04f33ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.sw? pkg + diff --git a/Gemfile b/Gemfile index 35f6baad..f85f376b 100644 --- a/Gemfile +++ b/Gemfile @@ -5,4 +5,8 @@ group :development do gem 'jeweler' gem 'sdoc-helpers' gem 'rdiscount' +end + +group :test do + gem 'test-unit' end \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 97e60c22..66a3898d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -24,6 +24,7 @@ GEM rdoc (= 2.4.3) sdoc-helpers (0.1.4) sdoc (~> 0.2) + test-unit (2.3.0) PLATFORMS ruby @@ -33,3 +34,4 @@ DEPENDENCIES rdiscount rspec sdoc-helpers + test-unit diff --git a/test/fakefs_test.rb b/test/fakefs_test.rb index 0e93a854..b3891185 100644 --- a/test/fakefs_test.rb +++ b/test/fakefs_test.rb @@ -45,15 +45,7 @@ def test_raises_error_when_creating_a_new_dir_with_mkdir_in_non_existent_path end end - def test_can_create_directories_with_mkpath - FileUtils.mkpath("/path/to/dir") - assert_kind_of FakeDir, FileSystem.fs['path']['to']['dir'] - end - def test_can_create_directories_with_mkpath_and_options - FileUtils.mkpath("/path/to/dir", :mode => 0755) - assert_kind_of FakeDir, FileSystem.fs['path']['to']['dir'] - end def test_can_create_directories_with_mkpath FileUtils.makedirs("/path/to/dir") diff --git a/test/fs_tests_failing.rb b/test/fs_tests_failing.rb index 56b6c1d3..cf3c335a 100644 --- a/test/fs_tests_failing.rb +++ b/test/fs_tests_failing.rb @@ -3,6 +3,7 @@ class AutoTests < Test::Unit::TestCase include FakeFsTestHelper + def test_symlink_creation compare_with_real do check_filesystem @@ -14,7 +15,7 @@ def test_symlink_creation end end - + def test_dir_entries compare_with_real do Dir.mkdir mp("somedir") @@ -24,7 +25,6 @@ def test_dir_entries check_value Dir.entries (mp (".")) end end - def test_dir_search compare_with_real do @@ -39,4 +39,3 @@ def test_dir_search end -# $a = AutoTests.new diff --git a/test/passing_fs_test.rb b/test/passing_fs_test.rb index 1b0e942b..a71b1000 100644 --- a/test/passing_fs_test.rb +++ b/test/passing_fs_test.rb @@ -16,7 +16,7 @@ def test_file_write end - def test_file_read + def test_file_read_nested compare_with_real do Dir.mkdir mp("somedir") Dir.mkdir mp("somedir/lol")