You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use __dir__ for expand_path in rails_helper template (#2048)
* Use __dir__ for expand_path in rails_helper template
Ruby 2.0 introduced `__dir__` pseudo variable, and we can replace it with `__FILE__` for `expand_path` method.
There is a RuboCop Cop pointing this out.
http://www.rubocop.org/en/latest/cops_style/#styleexpandpatharguments
This change reduces one RuboCop warning after installing rspec-rails.
* Use `__dir__` only when RUBY_VERSION >= 2.0
Use `__FILE__` otherwise so that the gem can support ruby 1.9.3 and lower.
0 commit comments