From 0a63582366fe5a2fe7c48b74b29de5da811b8689 Mon Sep 17 00:00:00 2001 From: hysios hu Date: Thu, 20 Sep 2012 14:01:41 +0800 Subject: [PATCH] update headless --- lib/jasmine/headless.rb | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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' -