Expanded switch statement
This commit is contained in:
parent
30e1ff8e51
commit
8ace079731
@ -18,15 +18,19 @@ module Jasmine
|
||||
|
||||
private
|
||||
def run_rake_task
|
||||
case Jasmine::Headless::Runner.run(
|
||||
:colors => colors,
|
||||
:remove_html_file => !@keep_on_error,
|
||||
:jasmine_config => @jasmine_config
|
||||
)
|
||||
when 1
|
||||
raise Jasmine::Headless::TestFailure
|
||||
when 2
|
||||
raise Jasmine::Headless::ConsoleLogUsage
|
||||
result = Jasmine::Headless::Runner.run(
|
||||
:colors => colors,
|
||||
:remove_html_file => !@keep_on_error,
|
||||
:jasmine_config => @jasmine_config
|
||||
)
|
||||
case result
|
||||
when 1
|
||||
raise Jasmine::Headless::TestFailure
|
||||
when 2
|
||||
raise Jasmine::Headless::ConsoleLogUsage
|
||||
else
|
||||
p "Unexpected Jasmine::Headless error code #{result}"
|
||||
raise Jasmine::Headless::TestFailure
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user