padrino / padrino-framework

Padrino is a full-stack ruby framework built upon Sinatra.

Home Page:http://www.padrinorb.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[padrino-core] Routing test failed.

aldentea opened this issue · comments

What is the current behavior?

I found that a Routing test failed, which seems to be caused by sinatra/sinatra#1566 .

1) Failure:

Routing#test_0138_should render sinatra NotFound page [/home/travis/build/padrino/padrino-framework/padrino-core/test/test_routing.rb:2125]:

Expected /(Sinatra doesn’t know this ditty.|<h1>Not Found</h1>)/ to match # encoding: ASCII-8BIT

# valid: true

"GET /".

350 runs, 1087 assertions, 1 failures, 0 errors, 2 skips

What is the expected behavior?

If the test case is the scripture, we can override route_missing method at Padrino::Application with previous implementation of Sinatra::Base#route_missing, which makes the test pass.
On the other hand, we can have an idea that the test case should be revised.

I can't judge which should be taken, so just point it out.

I just checked and sinatra/sinatra#1566 changes it so that 404's will include the missing URL in the content. So this is expected behavior and the test simply needs to be modified to expect the missing URL in the body.

I believe this is resolved now