spec/spec_helper.rb in lorj-1.0.17 vs spec/spec_helper.rb in lorj-1.0.18
- old
+ new
@@ -76,9 +76,20 @@
next if [:'@lib_path', :'@core_level'].include?(v)
instance_variable_set(v, nil)
end
end
+ def show_log(lorj_debug = nil)
+ return unless ENV['RSPEC_DEBUG'] == 'true'
+
+ env_lorj_debug = ENV['LORJ_DEBUG']
+ if lorj_debug.nil? && env_lorj_debug && /[0-9]/ =~ env_lorj_debug
+ lorj_debug = ENV['LORJ_DEBUG'].to_i
+ end
+ PrcLib.core_level = lorj_debug unless lorj_debug.nil?
+ PrcLib.level = Logger::DEBUG
+ end
+
def to_s
a = {}
instance_variables.each do |v|
a[v] = instance_variable_get(v)
end