aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/actionpack/controller/layout_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-07-25 00:31:35 +0200
committerXavier Noria <fxn@hashref.com>2016-07-25 00:31:35 +0200
commit7ebef567ce30d848dd8f9374fd70699fd91acb29 (patch)
tree9452737beec405626f309348b6d3c7fe4838ed91 /actionview/test/actionpack/controller/layout_test.rb
parent11b463d8cbacfe2cc1662f9e314440de71806ca9 (diff)
downloadrails-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/actionpack/controller/layout_test.rb')
-rw-r--r--actionview/test/actionpack/controller/layout_test.rb3
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