diff options
author | Xavier Noria <fxn@hashref.com> | 2016-07-25 00:31:35 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-07-25 00:31:35 +0200 |
commit | 7ebef567ce30d848dd8f9374fd70699fd91acb29 (patch) | |
tree | 9452737beec405626f309348b6d3c7fe4838ed91 /actionview/test | |
parent | 11b463d8cbacfe2cc1662f9e314440de71806ca9 (diff) | |
download | rails-7ebef567ce30d848dd8f9374fd70699fd91acb29.tar.gz rails-7ebef567ce30d848dd8f9374fd70699fd91acb29.tar.bz2 rails-7ebef567ce30d848dd8f9374fd70699fd91acb29.zip |
systematic revision of =~ usage in AV
Where appropriate, prefer the more concise Regexp#match?,
String#include?, String#start_with?, or String#end_with?
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/actionpack/controller/layout_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionview/test/actionpack/controller/layout_test.rb b/actionview/test/actionpack/controller/layout_test.rb index 64bc4c41d6..ecfef3dc8c 100644 --- a/actionview/test/actionpack/controller/layout_test.rb +++ b/actionview/test/actionpack/controller/layout_test.rb @@ -1,5 +1,6 @@ require 'abstract_unit' require 'active_support/core_ext/array/extract_options' +require 'active_support/core_ext/regexp' # The view_paths array must be set on Base and not LayoutTest so that LayoutTest's inherited # method has access to the view_paths array when looking for a layout to automatically assign. @@ -252,7 +253,7 @@ class LayoutStatusIsRenderedTest < ActionController::TestCase end end -unless RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ +unless /mswin|mingw/.match?(RbConfig::CONFIG['host_os']) class LayoutSymlinkedTest < LayoutTest layout "symlinked/symlinked_layout" end |