Sha256: 2656cc36aac323c973f08e3cecbe56a62faf3e8235d846dda44aa8b36b6391c7
Contents?: true
Size: 1.32 KB
Versions: 18
Compression:
Stored size: 1.32 KB
Contents
require 'helper' class TestHttpMethod < Test::Unit::TestCase context "ntail" do context "(with Sickill::Rainbow enabled)" do setup do Sickill::Rainbow.enabled = true end should "color-code the HTTP method" do # read-only methods are never color-coded... log_line = random_log_line(:http_method => 'GET') assert_equal "GET", log_line.to_http_method_s # methods that change state are ALWAYS color-coded if Rainbow is enabled... log_line = random_log_line(:http_method => 'POST') assert_not_equal "POST", log_line.to_http_method_s assert_equal "POST".inverse, log_line.to_http_method_s end end context "(with Sickill::Rainbow disabled)" do setup do Sickill::Rainbow.enabled = false end should "NOT color-code the HTTP method" do # read-only methods are never color-coded... log_line = random_log_line(:http_method => 'GET') assert_equal "GET", log_line.to_http_method_s # methods that change state are NOT color-coded if Rainbow is disabled... log_line = random_log_line(:http_method => 'POST') assert_equal "POST", log_line.to_http_method_s end end end end
Version data entries
18 entries across 18 versions & 1 rubygems