Created
October 22, 2012 11:59
-
-
Save charger/3931211 to your computer and use it in GitHub Desktop.
Try to test sinatra app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test/unit' | |
require 'rack/test' | |
require 'sinatra/async' | |
class MyAppTest < Test::Unit::TestCase | |
include Rack::Test::Methods | |
def app | |
Sinatra::Application | |
end | |
def test_add_task | |
get '/send', :http => 'http://ya.ru/' | |
assert_equal 200, last_response.status | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment