Moved error_and_exit and wrap_output to their own mixins
This commit is contained in:
parent
a1794dca80
commit
398e254c39
|
@ -0,0 +1,15 @@
|
|||
module Vagrant
|
||||
module Util
|
||||
module ErrorHelper
|
||||
def error_and_exit(key, data = {})
|
||||
abort <<-error
|
||||
=====================================================================
|
||||
Vagrant experienced an error!
|
||||
|
||||
#{Translator.t(key, data).chomp}
|
||||
=====================================================================
|
||||
error
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,11 @@
|
|||
module Vagrant
|
||||
module Util
|
||||
module OutputHelper
|
||||
def wrap_output
|
||||
puts "====================================================================="
|
||||
yield
|
||||
puts "====================================================================="
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
require File.join(File.dirname(__FILE__), '..', '..', 'test_helper')
|
||||
|
||||
class ErrorHelperUtilTest < Test::Unit::TestCase
|
||||
# TODO
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
require File.join(File.dirname(__FILE__), '..', '..', 'test_helper')
|
||||
|
||||
class OutputHelperUtilTest < Test::Unit::TestCase
|
||||
# TODO
|
||||
end
|
Loading…
Reference in New Issue