aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/rake_test.rb
diff options
context:
space:
mode:
authorMatthew Erhard <merhard@gmail.com>2015-12-02 14:00:01 -0500
committerMatthew Erhard <merhard@gmail.com>2015-12-02 14:00:01 -0500
commitc3668c39502405607f33faff18b450623809dbba (patch)
tree101e9fc2f45073cf769b389ec93069035b7cd4bc /railties/test/application/rake_test.rb
parent72b92e817281ddc74e587295fcaa5422cdca01f8 (diff)
downloadrails-c3668c39502405607f33faff18b450623809dbba.tar.gz
rails-c3668c39502405607f33faff18b450623809dbba.tar.bz2
rails-c3668c39502405607f33faff18b450623809dbba.zip
Fix failing test using custom file watcher
LoadingTest#test_does_not_reload_constants_on_development_if_custom_file_watcher_always_returns_false in railties/test/application/loading_test.rb is failing with: `NoMethodError: undefined method 'execute' for #<#<Class:0x00000002465a30>:0x00000001f79698>` The test creates an anonymous class to be used as a custom file watcher using `config.file_watcher=`. Per the Rails guides for Configuring, the class set to `config.file_watcher` “Must conform to ActiveSupport::FileUpdateChecker API”. Per the docs for ActiveSupport::FileUpdateChecker, the API depends on four methods: #initialize, #updated?, #execute, and #execute_if_updated. The custom file watcher in the failing test only implements the first two methods. This pull request adds #execute and #execute_if_updated to the custom file_watcher, conforming it to the ActiveSupport::FileUpdateChecker API, and passing the test.
Diffstat (limited to 'railties/test/application/rake_test.rb')
0 files changed, 0 insertions, 0 deletions