Permalink
Browse files

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.
  • Loading branch information...
1 parent 5ca009a commit 78e3a488291fcc28e8293a25f3d5f1e95741d362 Kim Burgestrand committed Mar 26, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/capybara/rails.rb
View
2 lib/capybara/rails.rb
@@ -3,7 +3,7 @@
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

0 comments on commit 78e3a48

Please sign in to comment.