aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/file_update_checker_shared_tests.rb
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2015-12-18 10:08:35 -0500
committereileencodes <eileencodes@gmail.com>2015-12-18 10:17:28 -0500
commiteac2eea3e1452ee93db46049375c1f38164d3d33 (patch)
tree0af134370f2ae24337ca834ab95b0f26ecb006b4 /activesupport/test/file_update_checker_shared_tests.rb
parent65146b58d19ff92c4da1a68b45c2d8c44e2a1c0c (diff)
downloadrails-eac2eea3e1452ee93db46049375c1f38164d3d33.tar.gz
rails-eac2eea3e1452ee93db46049375c1f38164d3d33.tar.bz2
rails-eac2eea3e1452ee93db46049375c1f38164d3d33.zip
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' ```
Diffstat (limited to 'activesupport/test/file_update_checker_shared_tests.rb')
-rw-r--r--activesupport/test/file_update_checker_shared_tests.rb1
1 files changed, 1 insertions, 0 deletions
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 }