Browse files

Fix spec so it runs in today's Sinatra

  • Loading branch information...
1 parent 50db904 commit a9eab6d984b407850d9e40897fc71be4da48e18f @mpalmer mpalmer committed Mar 6, 2011
Showing with 9 additions and 4 deletions.
  1. +9 −4 spec/url_for_spec.rb
View
13 spec/url_for_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
require 'sinatra'
-require 'sinatra/test'
require 'sinatra/url_for'
+require 'rack/test'
get "/" do
content_type "text/plain"
@@ -13,11 +13,16 @@
end
describe Sinatra::UrlForHelper do
- include Sinatra::Test
+ include Rack::Test::Methods
+
+ def app
+ Sinatra::Application
+ end
+
it "should return absolute paths and full URLs" do
get "/"
- response.should be_ok
- response.body.should == <<EOD
+ last_response.should be_ok
+ last_response.body.should == <<EOD
/
/foo
http://example.org/foo

0 comments on commit a9eab6d

Please sign in to comment.