Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

dandorman/rack_request_blocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RackRequestBlocker

NOTE: Please see this repo if you're looking for the rack_request_blocker gem.

Inserts a middleware at the top of the stack that stops further requests and waits for in-flight requests to complete before proceeding. This is helpful for Capybara full-stack tests where AJAX requests still in-flight interfere with test tear-down. Based on "Tearing Down Capybara Tests of AJAX Pages" by Joel Turkel at Salsify.

Installation

Add these lines to your application's Gemfile:

group :test do
  gem "rack_request_blocker"
end

And then execute:

$ bundle

Or install it yourself as:

$ gem install rack_request_blocker

Usage

Add the following line to your spec_helper.rb file:

require "rack_request_blocker/rspec"

That's it.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/rack_request_blocker/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Inserts a request-blocking Rack middleware for full-stack testing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages