spec/spec_helper.rb in xsd-populator-0.2.0 vs spec/spec_helper.rb in xsd-populator-0.2.1
- old
+ new
@@ -2,12 +2,24 @@
#
# Copyright (C) 2010 Mohammed Morsi <movitto@yahoo.com>
# Licensed under the AGPLv3+ http://www.gnu.org/licenses/agpl.txt
require 'rspec'
+require 'nokogiri'
+require 'logger'
+begin
+ require 'byebug'
+rescue LoadError => e
+ Logger.new(STDOUT).warn("Could not load byebug, continuing without it")
+end
+
+def spec_logger
+ @spec_logger_cache ||= Logger.new(STDOUT).tap do |logr|
+ logr.level = Logger::WARN
+ end
+end
+
CURRENT_DIR=File.dirname(__FILE__)
$: << File.expand_path(CURRENT_DIR + "/../lib")
require 'xsd_populator'
-require 'byebug'
-require 'nokogiri'
\ No newline at end of file