> @@ -115,6 +133,14 @@ def run_default_server(app, port)
>          end
>        end
>  
> +      def rails_version
> +        if ::Rails.version.to_f >= 3.0

I'd do something like this:
````ruby
::Rails.version.to_f >= 3.0 ? 3 : 2
````

Although this does not work anymore because there is Rails 4 around the corner. 
Maybe it should be named to `legacy_rails?` and have implementation in the 
lines of:

````ruby
def legacy_rails?
  ::Rails.version.to_f < 3.0
end````

---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-rails/pull/2/files#r4342359
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to