From 1df3b65acccaee908b6a579640f5060094fad8c0 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 8 Feb 2011 10:42:03 -0800 Subject: use === so that regular expressions are not required --- activesupport/test/file_watcher_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activesupport/test/file_watcher_test.rb') diff --git a/activesupport/test/file_watcher_test.rb b/activesupport/test/file_watcher_test.rb index 54aa9f92f1..3e577df5af 100644 --- a/activesupport/test/file_watcher_test.rb +++ b/activesupport/test/file_watcher_test.rb @@ -21,6 +21,16 @@ class FileWatcherTest < ActiveSupport::TestCase end end + def test_use_triple_equals + fw = ActiveSupport::FileWatcher.new + called = [] + fw.watch("some_arbitrary_file.rb") do |file| + called << "omg" + end + fw.trigger(%w{ some_arbitrary_file.rb }) + assert_equal ['omg'], called + end + def test_one_change @backend.trigger("app/assets/main.scss" => :changed) assert_equal({:changed => ["app/assets/main.scss"]}, @payload.first) -- cgit v1.2.3