-
-
Notifications
You must be signed in to change notification settings - Fork 547
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Use path relative to the file in the bin directory rather than the current working directory. for enable-executable and executable-tests-check
- Loading branch information
Showing
2 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
require 'minitest/autorun' | ||
|
||
(Dir.glob('**/*test.rb') + Dir.glob('bin/*')).each do |f| | ||
describe f do | ||
# Assume that this file lives in #{base}/bin | ||
base = File.join(__dir__,'..') | ||
files = Dir.glob("#{base}/**/*test.rb") + Dir.glob("#{base}/bin/*") | ||
|
||
files.each do |file| | ||
describe file do | ||
it 'should have the execution bit set' do | ||
assert File.executable?(f), "Execution bit not set for #{f}" | ||
assert File.executable?(file), "Execution bit not set for #{file}" | ||
end | ||
end | ||
end |