Add a reproduction case for this issue :(
This commit is contained in:
parent
e7b27a4dd5
commit
8598aa1f21
|
@ -0,0 +1,7 @@
|
|||
source :gemcutter
|
||||
|
||||
gem "rake"
|
||||
gem "async_sinatra"
|
||||
gem "rack-test"
|
||||
gem "cucumber"
|
||||
gem "rspec"
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
require 'rubygems'
|
||||
require 'sinatra/async'
|
||||
|
||||
class AsyncTest < Sinatra::Base
|
||||
register Sinatra::Async
|
||||
|
||||
aget '/' do
|
||||
body "hello"
|
||||
end
|
||||
end
|
|
@ -0,0 +1,12 @@
|
|||
Given /^I am a bug$/ do
|
||||
end
|
||||
|
||||
When /^I get "([^"]*)"$/ do |arg1|
|
||||
aget '/'
|
||||
em_async_continue
|
||||
end
|
||||
|
||||
Then /^I should asplode$/ do
|
||||
last_response.body.should == "hello"
|
||||
end
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
ENV["RACK_ENV"] = 'test'
|
||||
require 'rspec'
|
||||
require 'test/unit'
|
||||
require 'rack/test'
|
||||
require "sinatra/async/test"
|
||||
|
||||
require File.expand_path(File.dirname(__FILE__) + "/../../app/server")
|
||||
|
||||
module AppRunner
|
||||
def app
|
||||
AsyncTest.new
|
||||
end
|
||||
end
|
||||
World(Test::Unit::Assertions, Sinatra::Async::Test::Methods, AppRunner)
|
||||
|
||||
def post_json(path,json)
|
||||
header 'Content-Type', 'application/json'
|
||||
apost path, json.to_json
|
||||
em_async_continue
|
||||
last_response
|
||||
end
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
Feature: Herp
|
||||
|
||||
Scenario: Derp
|
||||
Given I am a bug
|
||||
When I get "/"
|
||||
Then I should asplode
|
Loading…
Reference in New Issue