better output handling

This commit is contained in:
Laurent Sansonetti
2012-06-29 21:40:44 +02:00
parent b912e39f66
commit 165c708eaa

View File

@@ -136,18 +136,14 @@ module Bacon
def handle_summary; end
end
extend case ENV['output']
when nil, 'spec_dox'
SpecDoxOutput # default
when 'fast'
FastOutput
when 'test_unit'
TestUnitOutput
when 'tap'
TapOutput
when 'knock'
KnockOutput
end
Outputs = {
'spec_dox' => SpecDoxOutput,
'fast' => FastOutput,
'test_unit' => TestUnitOutput,
'tap' => TapOutput,
'knock' => KnockOutput
}
extend(Outputs[ENV['output']] || SpecDoxOutput)
class Error < RuntimeError
attr_accessor :count_as