Skip to content

Instantly share code, notes, and snippets.

@charger
Created October 22, 2012 11:59
Show Gist options
  • Save charger/3931211 to your computer and use it in GitHub Desktop.
Save charger/3931211 to your computer and use it in GitHub Desktop.
Try to test sinatra app
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