spec/lib/helpers.rb in loggability-0.2.3 vs spec/lib/helpers.rb in loggability-0.3.0

- old
+ new

@@ -20,41 +20,10 @@ end end require 'loggability' unless defined?( Loggability ) - -# -# Some helper functions for RSpec specifications -# -module Loggability::SpecHelpers - - ### Reset the logging subsystem to its default state. - def reset_logging - Loggability.formatter = nil - Loggability.output_to( $stderr ) - Loggability.level = :fatal - end - - - ### Alter the output of the default log formatter to be pretty in SpecMate output - def setup_logging( level=:fatal ) - - # Only do this when executing from a spec in TextMate - if ENV['HTML_LOGGING'] || (ENV['TM_FILENAME'] && ENV['TM_FILENAME'] =~ /_spec\.rb/) - logarray = [] - Thread.current['logger-output'] = logarray - Loggability.output_to( logarray ) - Loggability.format_as( :html ) - Loggability.level = :debug - else - Loggability.level = level - end - end - - -end # Loggability::SpecHelpers - +require 'loggability/spechelpers' ### Mock with RSpec RSpec.configure do |c| c.mock_with( :rspec )