提交 9fa366a3 编写于 作者: X Xavier Noria

adds another test case in the monitors suite

上级 3cd47752
......@@ -93,7 +93,7 @@ def test_should_cache_updated_result_until_execute
assert !checker.updated?
end
def test_should_execute_the_block_if_files_change_in_a_watched_directory
def test_should_execute_the_block_if_files_change_in_a_watched_directory_one_extension
i = 0
checker = new_checker([], @tmpdir => :rb) { i += 1 }
......@@ -104,6 +104,22 @@ def test_should_execute_the_block_if_files_change_in_a_watched_directory
assert_equal 1, i
end
def test_should_execute_the_block_if_files_change_in_a_watched_directory_several_extensions
i = 0
checker = new_checker([], @tmpdir => [:rb, :txt]) { i += 1 }
touch("#{@tmpdir}/foo.rb")
assert checker.execute_if_updated
assert_equal 1, i
touch("#{@tmpdir}/foo.rb")
assert checker.execute_if_updated
assert_equal 2, i
end
def test_should_not_execute_the_block_if_the_file_extension_is_not_watched
i = 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册