Skip to content
This repository
Browse code

Fix some railties test warnings

  • Loading branch information...
commit 2282964de77eae623284c2cd47cb2f21045b290f 1 parent db924e1
Vipul A M authored
5  activesupport/lib/active_support/log_subscriber.rb
@@ -53,10 +53,9 @@ class LogSubscriber
53 53
 
54 54
     class << self
55 55
       def logger
56  
-        if defined?(Rails) && Rails.respond_to?(:logger)
57  
-          @logger ||= Rails.logger
  56
+        @logger ||= if defined?(Rails) && Rails.respond_to?(:logger)
  57
+          Rails.logger
58 58
         end
59  
-        @logger
60 59
       end
61 60
 
62 61
       attr_writer :logger
2  railties/test/generators/plugin_new_generator_test.rb
@@ -124,7 +124,7 @@ def test_ensure_that_skip_active_record_option_is_passed_to_app_generator
124 124
     run_generator [destination_root, "--skip_active_record"]
125 125
     assert_no_file "test/dummy/config/database.yml"
126 126
     assert_file "test/test_helper.rb" do |contents|
127  
-      assert_no_match /ActiveRecord/, contents
  127
+      assert_no_match(/ActiveRecord/, contents)
128 128
     end
129 129
   end
130 130
 

0 notes on commit 2282964

Please sign in to comment.
Something went wrong with that request. Please try again.