Skip to content

Commit

Permalink
Merge pull request #157 from kotp/93_Make_Tests_Executable
Browse files Browse the repository at this point in the history
93 make tests executable
  • Loading branch information
kytrinyx committed May 30, 2015
2 parents 03ecce8 + 5ac248c commit 1a8e695
Show file tree
Hide file tree
Showing 72 changed files with 44 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ install:

script:
- rubocop -fs -D
- bin/executable-tests-check
- make test
- bin/fetch-configlet
- bin/configlet .
24 changes: 21 additions & 3 deletions SETUP.md
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 modified accumulate/accumulate_test.rb
100644 → 100755
Empty file.
Empty file modified acronym/acronym_test.rb
100644 → 100755
Empty file.
Empty file modified allergies/allergies_test.rb
100644 → 100755
Empty file.
Empty file modified anagram/anagram_test.rb
100644 → 100755
Empty file.
Empty file modified atbash-cipher/atbash_cipher_test.rb
100644 → 100755
Empty file.
Empty file modified beer-song/beer_song_test.rb
100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions bin/enable_executable.rb
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
11 changes: 11 additions & 0 deletions bin/executable-tests-check
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 modified binary-search-tree/binary_search_tree_test.rb
100644 → 100755
Empty file.
Empty file modified binary-search/binary_search_test.rb
100644 → 100755
Empty file.
Empty file modified binary/binary_test.rb
100644 → 100755
Empty file.
Empty file modified bob/bob_test.rb
100644 → 100755
Empty file.
Empty file modified circular-buffer/circular_buffer_test.rb
100644 → 100755
Empty file.
Empty file modified clock/clock_test.rb
100644 → 100755
Empty file.
Empty file modified crypto-square/crypto_square_test.rb
100644 → 100755
Empty file.
Empty file modified custom-set/custom_set_test.rb
100644 → 100755
Empty file.
Empty file modified difference-of-squares/difference_of_squares_test.rb
100644 → 100755
Empty file.
Empty file modified etl/etl_test.rb
100644 → 100755
Empty file.
Empty file modified food-chain/food_chain_test.rb
100644 → 100755
Empty file.
Empty file modified gigasecond/gigasecond_test.rb
100644 → 100755
Empty file.
Empty file modified grade-school/grade_school_test.rb
100644 → 100755
Empty file.
Empty file modified grains/grains_test.rb
100644 → 100755
Empty file.
Empty file modified hamming/hamming_test.rb
100644 → 100755
Empty file.
Empty file modified hello-world/hello_world_test.rb
100644 → 100755
Empty file.
Empty file modified hexadecimal/hexadecimal_test.rb
100644 → 100755
Empty file.
Empty file modified house/house_test.rb
100644 → 100755
Empty file.
Empty file modified kindergarten-garden/kindergarten_garden_test.rb
100644 → 100755
Empty file.
Empty file modified largest-series-product/largest_series_product_test.rb
100644 → 100755
Empty file.
Empty file modified leap/leap_test.rb
100644 → 100755
Empty file.
Empty file modified linked-list/linked_list_test.rb
100644 → 100755
Empty file.
Empty file modified luhn/luhn_test.rb
100644 → 100755
Empty file.
Empty file modified matrix/matrix_test.rb
100644 → 100755
Empty file.
Empty file modified meetup/meetup_test.rb
100644 → 100755
Empty file.
Empty file modified minesweeper/minesweeper_test.rb
100644 → 100755
Empty file.
Empty file modified nth-prime/nth_prime_test.rb
100644 → 100755
Empty file.
Empty file modified nucleotide-count/nucleotide_count_test.rb
100644 → 100755
Empty file.
Empty file modified ocr-numbers/ocr_numbers_test.rb
100644 → 100755
Empty file.
Empty file modified octal/octal_test.rb
100644 → 100755
Empty file.
Empty file modified palindrome-products/palindrome_products_test.rb
100644 → 100755
Empty file.
Empty file modified pascals-triangle/pascals_triangle_test.rb
100644 → 100755
Empty file.
Empty file modified phone-number/phone_number_test.rb
100644 → 100755
Empty file.
Empty file modified pig-latin/pig_latin_test.rb
100644 → 100755
Empty file.
Empty file modified point-mutations/point_mutations_test.rb
100644 → 100755
Empty file.
Empty file modified prime-factors/prime_factors_test.rb
100644 → 100755
Empty file.
Empty file modified protein-translation/protein_translation_test.rb
100644 → 100755
Empty file.
Empty file modified proverb/proverb_test.rb
100644 → 100755
Empty file.
Empty file modified pythagorean-triplet/pythagorean_triplet_test.rb
100644 → 100755
Empty file.
Empty file modified queen-attack/queen_attack_test.rb
100644 → 100755
Empty file.
Empty file modified raindrops/raindrops_test.rb
100644 → 100755
Empty file.
Empty file modified rna-transcription/rna_transcription_test.rb
100644 → 100755
Empty file.
Empty file modified robot-name/robot_name_test.rb
100644 → 100755
Empty file.
Empty file modified robot-simulator/robot_simulator_test.rb
100644 → 100755
Empty file.
Empty file modified roman-numerals/roman_numerals_test.rb
100644 → 100755
Empty file.
Empty file modified saddle-points/saddle_points_test.rb
100644 → 100755
Empty file.
Empty file modified say/say_test.rb
100644 → 100755
Empty file.
Empty file modified scale-generator/scale_generator_test.rb
100644 → 100755
Empty file.
Empty file modified scrabble-score/scrabble_score_test.rb
100644 → 100755
Empty file.
Empty file modified secret-handshake/secret_handshake_test.rb
100644 → 100755
Empty file.
Empty file modified series/series_test.rb
100644 → 100755
Empty file.
Empty file modified sieve/sieve_test.rb
100644 → 100755
Empty file.
Empty file modified simple-cipher/simple_cipher_test.rb
100644 → 100755
Empty file.
Empty file modified simple-linked-list/simple_linked_list_test.rb
100644 → 100755
Empty file.
Empty file modified space-age/space_age_test.rb
100644 → 100755
Empty file.
Empty file modified strain/strain_test.rb
100644 → 100755
Empty file.
Empty file modified sum-of-multiples/sum_of_multiples_test.rb
100644 → 100755
Empty file.
Empty file modified triangle/triangle_test.rb
100644 → 100755
Empty file.
Empty file modified trinary/trinary_test.rb
100644 → 100755
Empty file.
Empty file modified twelve-days/twelve_days_test.rb
100644 → 100755
Empty file.
Empty file modified word-count/word_count_test.rb
100644 → 100755
Empty file.
Empty file modified wordy/wordy_test.rb
100644 → 100755
Empty file.

0 comments on commit 1a8e695

Please sign in to comment.