Skip to content

Instantly share code, notes, and snippets.

@kangkyu
Last active Nov 2, 2018
Embed
What would you like to do?
There should be better ways - hope anybody comment it

Use guard-shell gem.

# terminal (at exercism/ruby/)
gem install guard guard-shell
guard init shell
# Guardfile
guard :shell do
  watch(/^(.+)\.rb$/) do |m|
    `ruby -I"lib:test" #{m[1].chomp('_test')}_test.rb`
  end
end

Use minitest-reporters gem to add Red and Green

# terminal
gem install minitest-reporters
# test_helper.rb
require "minitest/reporters"
Minitest::Reporters.use!
# Guardfile
guard :shell do
  watch(/^(.+)\.rb$/) do |m|
    `ruby -I"lib:test" -r"./test_helper" #{m[1].chomp('_test')}_test.rb`
  end
end

Add more options to Minitest::Reporters

# test_helper.rb
require "minitest/reporters"
reporter_options = {
  detailed_skip: false, # true by default
  fast_fail: true, # false by default
  color: true
}
Minitest::Reporters.use! [Minitest::Reporters::DefaultReporter.new(reporter_options)]

Run it

# terminal (at exercism/ruby/)
guard --notify false
@kkchu791

This comment has been minimized.

Copy link

@kkchu791 kkchu791 commented Feb 24, 2016

Interesting. Is this contributing to exercism open source?

I'm wonder if we do all these directions within the ruby directory or the specific exercise directory ( for example in helloword directory)?

@kangkyu

This comment has been minimized.

Copy link
Owner Author

@kangkyu kangkyu commented Nov 2, 2018

The answer is: in the exercism/ruby directory. Thank you @kkchu791 for asking, sorry for being late to answer! By the way, I just found your comment while I'm working on the listy-gisty, (do you remember this Study Group project?) which helps me go find old gists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment