6
7
8
9
10
|
# File 'lib/redirect/test.rb', line 6
def assert_redirects(from, to)
res = Rack::MockRequest.new(APP[:redirect_app]).get(from)
res..should == { 'Location' => to, 'Content-Type' => 'text/html' }
res.body.should == "Redirecting to: \#{to}"
end
|