Bugs: Browse | Submit New | Admin

[#29273] clean called twice

Date:
2011-06-12 05:24
Priority:
3
Submitted By:
Stephan Wehner (stephanwehner)
Assigned To:
Eric Hodel (drbrain)
Category:
SyslogLogger
State:
Open
Summary:
clean called twice

Detailed description
I add these tests to class TestSyslogLoggerin test_syslog_logger.rb

  def test_add_with_percentage
    msg = log_add Logger::INFO,  'info level message with percentage %'
    assert_equal 'INFO - info level message with percentage %%', msg.line
  end 

  def test_info_with_percentage
    msg = @logger.info  'info level message with percentage %'
    assert_equal 'INFO - info level message with percentage %%', MockSyslog::line
  end 

It seems to me the same message should be logged.
I get this failure:

$ ruby test_syslog_logger.rb  -n /with_percentage/
Loaded suite test_syslog_logger
Started
F.
Finished in 0.002746 seconds.

  1) Failure:
test_add_with_percentage(TestSyslogLogger) [test_syslog_logger.rb:492]:
<"INFO - info level message with percentage %%"> expected but was
<"INFO - info level message with percentage %%%%">.

2 tests, 3 assertions, 1 failures, 0 errors, 0 skips
The method SyslogLogger#add invokes clean twice. It looks like a typo.

Stephan

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item