mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Make sure we are comparing gem versions, closes #1024
Due to rails/rails#8501, we can no longer case the Rails version to a float. This version should hopefully work on both Rails 4 master and on Rails 3.
This commit is contained in:
parent
5ca009a27a
commit
78e3a48829
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ require 'capybara/dsl'
|
|||
|
||||
Capybara.app = Rack::Builder.new do
|
||||
map "/" do
|
||||
if Rails.version.to_f >= 3.0
|
||||
if Gem::Version.new(Rails.version) >= Gem::Version.new("3.0")
|
||||
run Rails.application
|
||||
else # Rails 2
|
||||
use Rails::Rack::Static
|
||||
|
|
Loading…
Reference in a new issue