Skip to content

Commit

Permalink
Make sure we are comparing gem versions, closes #1024
Browse files Browse the repository at this point in the history
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
Kim Burgestrand committed Mar 26, 2013
1 parent 5ca009a commit 78e3a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/capybara/rails.rb
Expand Up @@ -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
Expand Down

0 comments on commit 78e3a48

Please sign in to comment.