1
0
Fork 0
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:
Kim Burgestrand 2013-03-26 13:24:49 +01:00
parent 5ca009a27a
commit 78e3a48829

View file

@ -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