@@ -21,7 +21,7 @@ fn when_monitored_file_does_not_exist_then_new_does_not_return_error() {
2121
2222#[ test]
2323fn when_new_line_is_added_to_file_then_update_callback_is_called ( ) {
24- let mut file = TestFile :: new ( "auth-monitor-test" ) ;
24+ let mut file = TestFile :: with_unique_name ( ) ;
2525 let mut auth_file_watcher =
2626 AuthFileWatcher :: new ( & file. filepath ) . expect ( "Error creating AuthFileWatcher" ) ;
2727 expect_no_update_callback_call ( & mut auth_file_watcher) ;
@@ -47,7 +47,7 @@ fn expect_update_callback_is_called_when_file_is_modified(
4747
4848#[ test]
4949fn when_more_than_one_line_is_added_then_update_callback_is_called_for_each_line ( ) {
50- let mut file = TestFile :: new ( "auth-monitor-test" ) ;
50+ let mut file = TestFile :: with_unique_name ( ) ;
5151 let mut auth_file_watcher =
5252 AuthFileWatcher :: new ( & file. filepath ) . expect ( "Error creating AuthFileWatcher" ) ;
5353 expect_no_update_callback_call ( & mut auth_file_watcher) ;
@@ -73,7 +73,7 @@ fn when_more_than_one_line_is_added_then_update_callback_is_called_for_each_line
7373
7474#[ test]
7575fn when_new_file_was_created_after_old_was_deleted_then_changes_in_new_file_are_monitored ( ) {
76- let mut file = TestFile :: new ( "auth-monitor-test" ) ;
76+ let mut file = TestFile :: with_unique_name ( ) ;
7777 let mut auth_file_watcher =
7878 AuthFileWatcher :: new ( & file. filepath ) . expect ( "Error creating AuthFileWatcher" ) ;
7979 expect_no_update_callback_call ( & mut auth_file_watcher) ;
@@ -95,7 +95,7 @@ fn expect_no_update_callback_call(auth_file_watcher: &mut AuthFileWatcher) {
9595
9696#[ test]
9797fn when_new_file_has_been_created_after_old_was_renamed_then_changes_in_new_file_are_monitored ( ) {
98- let mut file = TestFile :: new ( "auth-monitor-test" ) ;
98+ let mut file = TestFile :: with_unique_name ( ) ;
9999 let mut auth_file_watcher =
100100 AuthFileWatcher :: new ( & file. filepath ) . expect ( "Error creating AuthFileWatcher" ) ;
101101 expect_no_update_callback_call ( & mut auth_file_watcher) ;
@@ -111,7 +111,7 @@ fn when_new_file_has_been_created_after_old_was_renamed_then_changes_in_new_file
111111
112112#[ test]
113113fn when_monitored_file_has_been_truncated_then_changes_are_still_monitored ( ) {
114- let mut file = TestFile :: new ( "auth-monitor-test" ) ;
114+ let mut file = TestFile :: with_unique_name ( ) ;
115115 let mut auth_file_watcher =
116116 AuthFileWatcher :: new ( & file. filepath ) . expect ( "Error creating AuthFileWatcher" ) ;
117117 expect_no_update_callback_call ( & mut auth_file_watcher) ;
0 commit comments