test/unit/stdout_output_tests.rb in logsly-1.0.2 vs test/unit/stdout_output_tests.rb in logsly-1.1.0

- old
+ new

@@ -1,15 +1,16 @@ require 'assert' +require 'logsly/stdout_output' + require 'ostruct' require 'logging' -require 'logsly/settings' -require 'logsly/stdout_output' +require 'logsly' class Logsly::StdoutOutput - class BaseTests < Assert::Context - desc "the StdoutOutput handler" + class UnitTests < Assert::Context + desc "Logsly::StdoutOutput" setup do @logger = OpenStruct.new @logger.debug_level = :white @logger.pattern = '%d : %m\n' @@ -20,11 +21,11 @@ @out = Logsly::StdoutOutput.new do |logger| pattern logger.pattern colors 'a_color_scheme' end end - subject { @out } + subject{ @out } should "be an output handler" do assert_kind_of Logsly::BaseOutput, subject end @@ -34,8 +35,9 @@ assert_kind_of Logging::Appenders::Stdout, appender assert_kind_of Logging::Layouts::Pattern, appender.layout assert_equal '%d : %m\n', appender.layout.pattern assert_kind_of Logging::ColorScheme, appender.layout.color_scheme end + end end