lsegal/yard — Issue #397: test failures on Debian with Ruby 1.8 and 1.9.3
Author: ln
Created: 2011-10-16 12:44:21+00:00
State: open

Hi,

While creating a Debian package for yard, I ran into the following spec failures:

Ruby 1.8
=======
Failures:

1) YARD::Templates::Helpers::HtmlHelper#htmlify should autolink URLs (markdown specific)
Failure/Error: Unable to find matching line from backtrace
expected: "

http://example.com

"
got: "

http://example.com

" (using ==)
# ./spec/templates/helpers/html_helper_spec.rb:133
# debian/ruby-tests.rb:2

2) YARD::CLI::Yardoc#find_object should use cache if available
Failure/Error: Unable to find matching line from backtrace
received :exist? with unexpected arguments
expected: (".yardoc")
got: ("foo")
# ./lib/yard/cli/yri.rb:115:in `find_object'
# ./lib/yard/cli/yri.rb:114:in `each'
# ./lib/yard/cli/yri.rb:114:in `find_object'
# ./spec/cli/yri_spec.rb:21
# debian/ruby-tests.rb:2

3) YARD::CLI::Yardoc#find_object should never use cache ahead of current directory's .yardoc
Failure/Error: Unable to find matching line from backtrace
received :exist? with unexpected arguments
expected: (".yardoc")
got: ("foo")
# ./lib/yard/cli/yri.rb:115:in `find_object'
# ./lib/yard/cli/yri.rb:114:in `each'
# ./lib/yard/cli/yri.rb:114:in `find_object'
# ./spec/cli/yri_spec.rb:30
# debian/ruby-tests.rb:2

4) YARD::CLI::Yardoc#run should search for objects and print their documentation
Failure/Error: Unable to find matching line from backtrace
SystemExit:
exit
# ./lib/yard/cli/yri.rb:65:in `exit'
# ./lib/yard/cli/yri.rb:65:in `run'
# ./spec/cli/yri_spec.rb:71
# debian/ruby-tests.rb:2

Finished in 10.41 seconds
1265 examples, 4 failures, 1 pending

Ruby 1.9.3 (rc1)
=============
1) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError for invalid class 'CallMethod('test')'
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:65:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:65:in `block (3 levels) in '

2) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError for invalid class 'VSD^#}}'
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:65:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:65:in `block (3 levels) in '

3) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError for invalid class 'not.aclass'
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:65:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:65:in `block (3 levels) in '

4) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError for invalid class 'self'
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:65:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:65:in `block (3 levels) in '

5) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError for invalid superclass '@@INVALID' but it should create the class.
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:72:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:72:in `block (3 levels) in '

6) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError for invalid superclass 'hi' but it should create the class.
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:72:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:72:in `block (3 levels) in '

7) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError for invalid superclass '$MYCLASS' but it should create the class.
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:72:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:72:in `block (3 levels) in '

8) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError for invalid superclass 'AnotherClass.new' but it should create the class.
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:72:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:72:in `block (3 levels) in '

9) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError if the constant class reference 'class << SomeConstant' does not point to a valid class name
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:83:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:79:in `block (3 levels) in '

10) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError if the constant class reference 'class << SomeConstant' does not point to a valid class name
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:83:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:79:in `block (3 levels) in '

11) YARD::Handlers::Ruby::ClassHandler should raise an UndocumentableError if the constant class reference 'class << SomeConstant' does not point to a valid class name
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/class_handler_spec.rb:83:in `block (4 levels) in '
# ./spec/handlers/spec_helper.rb:13:in `with_parser'
# ./spec/handlers/class_handler_spec.rb:79:in `block (3 levels) in '

12) YARD::Handlers::Ruby::MethodHandler should raise an undocumentable error when a method is defined on an object instance
Failure/Error: Unable to find matching line from backtrace
expected YARD::Parser::UndocumentableError but nothing was raised
# ./spec/handlers/spec_helper.rb:7:in `undoc_error'
# ./spec/handlers/method_handler_spec.rb:127:in `block (2 levels) in '

13) YARD::Templates::Helpers::HtmlHelper#htmlify should autolink URLs (markdown specific)
Failure/Error: Unable to find matching line from backtrace
expected: "

http://example.com

"
got: "

http://example.com

" (using ==)
# ./spec/templates/helpers/html_helper_spec.rb:133:in `block (3 levels) in '

14) YARD::CLI::Yardoc#find_object should use cache if available
Failure/Error: Unable to find matching line from backtrace
received :exist? with unexpected arguments
expected: (".yardoc")
got: ("foo")
# ./lib/yard/cli/yri.rb:115:in `block in find_object'
# ./lib/yard/cli/yri.rb:114:in `each'
# ./lib/yard/cli/yri.rb:114:in `find_object'
# ./spec/cli/yri_spec.rb:21:in `block (3 levels) in '

15) YARD::CLI::Yardoc#find_object should never use cache ahead of current directory's .yardoc
Failure/Error: Unable to find matching line from backtrace
received :exist? with unexpected arguments
expected: (".yardoc")
got: ("foo")
# ./lib/yard/cli/yri.rb:115:in `block in find_object'
# ./lib/yard/cli/yri.rb:114:in `each'
# ./lib/yard/cli/yri.rb:114:in `find_object'
# ./spec/cli/yri_spec.rb:30:in `block (3 levels) in '

16) YARD::CLI::Yardoc#run should search for objects and print their documentation
Failure/Error: Unable to find matching line from backtrace
SystemExit:
exit
# ./lib/yard/cli/yri.rb:65:in `exit'
# ./lib/yard/cli/yri.rb:65:in `run'
# ./spec/cli/yri_spec.rb:71:in `block (3 levels) in '

Finished in 6.98 seconds
1313 examples, 16 failures, 1 pending

Thanks

Lucas