From eac2eea3e1452ee93db46049375c1f38164d3d33 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Fri, 18 Dec 2015 10:08:35 -0500 Subject: Fix test that fails in isolation This test needs to have a require for the Listen gem or else it returns an error when run by itself or with a certain order in the Active Support tests. We use `silence_warnings` because Listen has some warnings about private methods. It's already silenced when it's required in Active Support EventedFileUpdateChecker. ``` 1) Error: EventedFileUpdateCheckerTest#test_should_not_execute_the_block_if_no_paths_are_given: NameError: uninitialized constant EventedFileUpdateCheckerTest::Listen test/evented_file_update_checker_test.rb:21:in `teardown' ``` --- activesupport/test/file_update_checker_shared_tests.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/activesupport/test/file_update_checker_shared_tests.rb b/activesupport/test/file_update_checker_shared_tests.rb index 100cbc9756..9c07e38fe5 100644 --- a/activesupport/test/file_update_checker_shared_tests.rb +++ b/activesupport/test/file_update_checker_shared_tests.rb @@ -21,6 +21,7 @@ module FileUpdateCheckerSharedTests end test 'should not execute the block if no paths are given' do + silence_warnings { require 'listen' } i = 0 checker = new_checker { i += 1 } -- cgit v1.2.3