lib/test_belt/shoulda_macros/files.rb in test-belt-0.2.0 vs lib/test_belt/shoulda_macros/files.rb in test-belt-0.2.1

- old
+ new

@@ -19,13 +19,31 @@ end end end end protected :should_have_files + def skip_should_have_files(*files) + the_files = files.flatten + if the_files.empty? + should "(skip) have @root_path" do + skip + end + else + the_files.each do |file| + should "(skip) have the file '#{file}' in @root_path" do + skip + end + end + end + end + protected :skip_should_have_files alias_method :should_have_file, :should_have_files alias_method :should_have_directories, :should_have_files alias_method :should_have_directory, :should_have_files + alias_method :skip_should_have_file, :skip_should_have_files + alias_method :skip_should_have_directories, :skip_should_have_files + alias_method :skip_should_have_directory, :skip_should_have_files end Test::Unit::TestCase.extend(TestBelt::ShouldaMacros::Files) if defined? Test::Unit::TestCase