-
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from kotp/93_Make_Tests_Executable
93 make tests executable
- Loading branch information
Showing
72 changed files
with
44 additions
and
3 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,12 +1,30 @@ | ||
Refer exercism help page at http://help.exercism.io/getting-started-with-ruby.html for ruby installation and learning resources. | ||
Refer to the [exercism help | ||
page](http://help.exercism.io/getting-started-with-ruby.html) at | ||
for ruby installation and learning resources. | ||
|
||
For running the tests provided, you will need the Minitest gem. Open a terminal window and run the following command to install minitest: | ||
For running the tests provided, you will need the Minitest gem. Open a | ||
terminal window and run the following command to install minitest: | ||
|
||
gem install minitest | ||
|
||
If you would like color output, you can `require 'minitest/pride'` in | ||
the test file, or note the alternative instruction, below, for runnng | ||
the test file. | ||
|
||
In order to run the test, you can run the test file from the exercise directory. For example, if the test suite is called `hello_world_test.rb`, you can run the following command: | ||
|
||
In order to run the test, you can run the test file from the exercise | ||
directory. For example, if the test suite is called | ||
`hello_world_test.rb`, you can run the following command: | ||
|
||
ruby hello_world_test.rb | ||
|
||
To include color from the command line: | ||
|
||
ruby -rminitest/pride hello_world_test.rb | ||
|
||
The test files may have the execution bit set so you may also be | ||
able to run it like this: | ||
|
||
./hello_world_test.rb | ||
|
||
|
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env ruby | ||
puts 'Ensuring test files are executable...' | ||
|
||
Dir.glob('**/*test.rb').each do |f| | ||
if file.executable?(f) | ||
print '.' | ||
else | ||
print "Adding exec bit to #{f}." | ||
File.chmod(0744, f) | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env ruby | ||
require 'minitest/autorun' | ||
|
||
files = Dir.glob('**/*_test.rb') | ||
files.each do |f| | ||
describe "#{f}" do | ||
it 'should have the execution bit set' do | ||
assert File.executable?(f), "Execution bit not set for #{f}" | ||
end | ||
end | ||
end |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.