diff --git a/spec/integration/session_spec.rb b/spec/integration/session_spec.rb index d1c2fef..1b2f421 100644 --- a/spec/integration/session_spec.rb +++ b/spec/integration/session_spec.rb @@ -131,4 +131,55 @@ describe Capybara::Session do subject.response_headers['X-Capybara'].should == nil end end + + context "slow iframe app" do + before do + @app = Class.new(ExampleApp) do + get '/' do + <<-HTML + + + + + + Click Me! + +

+ + + HTML + end + + get '/slow' do + status 204 + sleep 1 + end + + get '/iframe' do + status 204 + end + end + end + + it "should not hang the server" do + subject.visit("/") + subject.click_link('Click Me!') + Capybara.using_wait_time(5) do + subject.should have_content("finished") + end + end + end end