Created
October 7, 2009 15:30
-
-
Save wvanbergen/204134 to your computer and use it in GitHub Desktop.
Audio-enabled, profanity-enabled unit testing
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
module Swearing | |
SWEAR_WORDS = ['dammit', 'fuck', 'son of a bitch', 'motherfucker', 'oh no', 'prick'] | |
SWEAR_VOICE = 'Alex' | |
def self.swear! | |
`say -v #{SWEAR_VOICE} #{SWEAR_WORDS[rand(SWEAR_WORDS.length)]} &` | |
end | |
end | |
class Test::Unit::Error | |
def single_character_display | |
Swearing.swear! | |
return 'E' | |
end | |
end | |
class Test::Unit::Failure | |
def single_character_display | |
Swearing.swear! | |
return 'F' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment