diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-14 11:36:01 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-14 11:36:01 +0000 |
commit | 7334e2f8368f2eae97fe4e3058ba3470768c4b69 (patch) | |
tree | e21d0db27b757970741f68113ed8d44eab98a21c | |
parent | 0e2e2cf4a118eb32d2402d923396180f3b505639 (diff) | |
download | ruby-7334e2f8368f2eae97fe4e3058ba3470768c4b69.tar.gz |
Don't read non .rb file as a spec
To avoid reading `core` file on reading core/ specs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | spec/mspec/lib/mspec/utils/script.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/mspec/lib/mspec/utils/script.rb b/spec/mspec/lib/mspec/utils/script.rb index 28be854a85..3e507d2b4a 100644 --- a/spec/mspec/lib/mspec/utils/script.rb +++ b/spec/mspec/lib/mspec/utils/script.rb @@ -185,7 +185,7 @@ class MSpecScript patterns.each do |pattern| expanded = File.expand_path(pattern) - if File.file?(expanded) + if File.file?(expanded) && expanded.end_with?('.rb') return [expanded] elsif File.directory?(expanded) return Dir["#{expanded}/**/*_spec.rb"].sort |