diff --git a/lib/jasmine/headless.rb b/lib/jasmine/headless.rb index 33ee28c..4503e8e 100644 --- a/lib/jasmine/headless.rb +++ b/lib/jasmine/headless.rb @@ -36,9 +36,26 @@ module Jasmine def root @root ||= Pathname(File.expand_path('../../..', __FILE__)) end + + def warn(message) + output.puts message if show_warnings? + end + + def show_warnings=(show) + @show_warnings = show + end + + def show_warnings? + @show_warnings = true if @show_warnings.nil? + + @show_warnings + end + + def output + $stdout + end end end end require 'jasmine/headless/errors' -