Rspecã§failããã¨ãã¹ã¡ã¿ã«ãæµããããã«ãã
ãã¾ãã«ããã¹ãéããªãã®ã§ãã¹ã¡ã¿ã«è´ãå§ãã
— â°â°â°â°null (@yuroyoro) 2015, 7æ 2
ãã®ãããªäºããã£ãã®ã§èªååããã
Macéå®ã
ãããªæããsuccessã ã¨ã¬ãã«ãã¢ã¬ãã
äºåã«bash-itunes ã¨ããã³ãã³ãã©ã¤ã³ãã¼ã«ãå
¥ãã¦ããã
iTunesãæ¥æ¬èªã§ä½¿ã£ã¦ãå ´åãpatchãå½ã¦ãå¿
è¦ãããã
こちらãå±±æ¤
ã³ã¼ãã¯ãããªã
class PlayItunesReporter attr_accessor :success_track, :failure_track def initialize(options = {}) @success_track = options[:success] @failure_track = options[:failure] end def dump_summary(notification) return unless notification.examples.length > 0 if notification.failed_examples.length == 0 play!(success_track) else play!(failure_track) end end def play!(track) `itunes play "#{track}"` end end RSpec.configure do |config| itunes = PlayItunesReporter.new(success: "ã¬ãã«ã»ã¢ãã", failure: 'Nemesis') config.reporter.register_listener itunes, :dump_summary end
æ£ç´ãæ²ã¯å¥½ããªã®ä½¿ãã°ããããªããªãこれã§ããã
inspired by : コンパイル中に音楽を流せる sbt プラグインを作りました。 - tototoshi の日記