Expanded switch statement

This commit is contained in:
Harry Lascelles 2012-07-28 12:39:31 +01:00
parent 30e1ff8e51
commit 8ace079731

View File

@ -18,15 +18,19 @@ module Jasmine
private private
def run_rake_task def run_rake_task
case Jasmine::Headless::Runner.run( result = Jasmine::Headless::Runner.run(
:colors => colors, :colors => colors,
:remove_html_file => !@keep_on_error, :remove_html_file => !@keep_on_error,
:jasmine_config => @jasmine_config :jasmine_config => @jasmine_config
) )
when 1 case result
raise Jasmine::Headless::TestFailure when 1
when 2 raise Jasmine::Headless::TestFailure
raise Jasmine::Headless::ConsoleLogUsage when 2
raise Jasmine::Headless::ConsoleLogUsage
else
p "Unexpected Jasmine::Headless error code #{result}"
raise Jasmine::Headless::TestFailure
end end
end end
end end