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
setup :silence_output | |
# Redirects stderr and stdout to /dev/null. | |
def silence_output | |
@orig_stderr = $stderr | |
@orig_stdout = $stdout | |
# redirect stderr and stdout to /dev/null | |
$stderr = File.new('/dev/null', 'w') | |
$stdout = File.new('/dev/null', 'w') |
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
def silence | |
orig_stdout = $stdout | |
$stdout = File.new('/dev/null', 'w') | |
yield | |
ensure | |
$stdout = orig_stdout | |
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
desc "Run tests, and have a little fun afterward." | |
task :test_reward => :test do | |
puts "\e[1m\e[35m ,%%%, \e[0m" | |
puts "\e[1m\e[35m ,%%%` %==--\e[5m\e[33m*\e[0m " | |
puts "\e[1m\e[35m ,%%`( '| \e[0m" | |
puts "\e[1m\e[35m ,%%@ /\_/ \e[0m" | |
puts "\e[1m\e[35m ,%.-\"\"\"--%%% \"@@__ \e[0m" | |
puts "\e[1m\e[35m %%/ |__`\ \e[0m" | |
puts "\e[1m\e[35m .%'\ | \ / // \e[0m" | |
puts "\e[1m\e[35m ,%' > .'----\ | [/ \e[0m" |
NewerOlder