Skip to content

Commit

Permalink
Also check config.allow_concurrency to match Rails 4.2 behavior for R…
Browse files Browse the repository at this point in the history
…ack::Lock
  • Loading branch information
twalpole committed Sep 22, 2014
1 parent 1626ddb commit 11da192
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version 2.4.3
Relase date: 2014-09-21

###Fixed
* Update concurrency prevention to match Rails 4.2 behavior

# Version 2.4.2
Release date: 2014-09-20

Expand Down
2 changes: 1 addition & 1 deletion lib/capybara/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Work around an issue where rails allows concurrency in test mode even though eager_load
# is false which can cause an issue with constant loading
if Gem::Version.new(Rails.version) >= Gem::Version.new("4.0")
use Rack::Lock unless Rails.application.config.eager_load || Rails.application.middleware.include?(Rack::Lock)
use Rack::Lock unless Rails.application.config.allow_concurrency || Rails.application.config.eager_load || Rails.application.middleware.include?(Rack::Lock)
end

map "/" do
Expand Down

0 comments on commit 11da192

Please sign in to comment.