Permalink
Browse files

- Set test_globs default value to pick up test/*spec* files as well. …

…(millisami)

[git-p4: depot-paths = "//src/hoe/dev/": change = 7733]
  • Loading branch information...
1 parent d270cd9 commit 12c6dc16486fdbe2226c7cf68bfa489872394e64 @zenspider zenspider committed Aug 20, 2012
Showing with 4 additions and 3 deletions.
  1. +3 −2 lib/hoe.rb
  2. +1 −1 lib/hoe/test.rb
View
@@ -514,7 +514,7 @@ def define_spec
s.require_paths = dirs unless dirs.empty?
s.rdoc_options = ['--main', readme_file]
s.post_install_message = post_install_message
- s.test_files = Dir[*self.test_globs]
+ s.test_files = Dir[*self.test_globs].uniq
missing "Manifest.txt" if s.files.empty?
@@ -599,7 +599,8 @@ def initialize name, version = nil # :nodoc:
self.spec_extras = {}
self.summary = nil
self.summary_sentences = 1
- self.test_globs = ['test/**/test_*.rb']
+ self.test_globs = ['test/**/{test,spec}_*.rb',
+ 'test/**/*_{test,spec}.rb']
if manifest = read_manifest then
self.readme_file = manifest.grep(/^README\./).first
View
@@ -83,7 +83,7 @@ def define_test_tasks
desc 'Show which test files fail when run alone.'
task :test_deps do
- tests = Dir["test/**/test_*.rb"] + Dir["test/**/*_test.rb"]
+ tests = Dir[*self.test_globs].uniq
paths = ['bin', 'lib', 'test'].join(File::PATH_SEPARATOR)
null_dev = Hoe::WINDOZE ? '> NUL 2>&1' : '&> /dev/null'

0 comments on commit 12c6dc1

Please sign in to comment.