Guest User

Untitled

a guest
Jun 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. ENV["RACK_ENV"] = 'test'
  2. require 'rspec'
  3. require 'test/unit'
  4. require 'rack/test'
  5. require "sinatra/async/test"
  6.  
  7. module AppRunner
  8. def app
  9. My::App.new
  10. end
  11. end
  12. World(Test::Unit::Assertions, Sinatra::Async::Test::Methods, AppRunner)
  13.  
  14. def post_json(path,json)
  15. header 'Content-Type', 'application/json'
  16. apost path, json.to_json
  17. em_async_continue
  18. last_response
  19. end
Add Comment
Please, Sign In to add comment