@@ -23,7 +23,7 @@ fn when_monitored_file_does_not_exist_then_new_does_not_return_error() {
2323fn when_new_line_is_added_to_file_then_update_callback_is_called ( ) {
2424 let mut file = TestFile :: with_unique_name ( ) ;
2525 let mut auth_file_watcher =
26- AuthFileWatcher :: new ( & file. filepath ) . expect ( "Error creating AuthFileWatcher" ) ;
26+ AuthFileWatcher :: new ( file. path ( ) ) . expect ( "Error creating AuthFileWatcher" ) ;
2727 expect_no_update_callback_call ( & mut auth_file_watcher) ;
2828 expect_update_callback_is_called_when_file_is_modified ( & mut file, & mut auth_file_watcher) ;
2929}
@@ -49,7 +49,7 @@ fn expect_update_callback_is_called_when_file_is_modified(
4949fn when_more_than_one_line_is_added_then_update_callback_is_called_for_each_line ( ) {
5050 let mut file = TestFile :: with_unique_name ( ) ;
5151 let mut auth_file_watcher =
52- AuthFileWatcher :: new ( & file. filepath ) . expect ( "Error creating AuthFileWatcher" ) ;
52+ AuthFileWatcher :: new ( file. path ( ) ) . expect ( "Error creating AuthFileWatcher" ) ;
5353 expect_no_update_callback_call ( & mut auth_file_watcher) ;
5454
5555 let mut call_count = 0 ;
@@ -75,7 +75,7 @@ fn when_more_than_one_line_is_added_then_update_callback_is_called_for_each_line
7575fn when_new_file_was_created_after_old_was_deleted_then_changes_in_new_file_are_monitored ( ) {
7676 let mut file = TestFile :: with_unique_name ( ) ;
7777 let mut auth_file_watcher =
78- AuthFileWatcher :: new ( & file. filepath ) . expect ( "Error creating AuthFileWatcher" ) ;
78+ AuthFileWatcher :: new ( file. path ( ) ) . expect ( "Error creating AuthFileWatcher" ) ;
7979 expect_no_update_callback_call ( & mut auth_file_watcher) ;
8080
8181 file. remove ( ) ;
@@ -97,10 +97,10 @@ fn expect_no_update_callback_call(auth_file_watcher: &mut AuthFileWatcher) {
9797fn when_new_file_has_been_created_after_old_was_renamed_then_changes_in_new_file_are_monitored ( ) {
9898 let mut file = TestFile :: with_unique_name ( ) ;
9999 let mut auth_file_watcher =
100- AuthFileWatcher :: new ( & file. filepath ) . expect ( "Error creating AuthFileWatcher" ) ;
100+ AuthFileWatcher :: new ( file. path ( ) ) . expect ( "Error creating AuthFileWatcher" ) ;
101101 expect_no_update_callback_call ( & mut auth_file_watcher) ;
102102
103- rename_file ( & file. filepath , "auth-monitor-test.bak" ) ;
103+ rename_file ( file. path ( ) , "auth-monitor-test.bak" ) ;
104104 expect_no_update_callback_call ( & mut auth_file_watcher) ;
105105
106106 file. create ( ) ;
@@ -113,7 +113,7 @@ fn when_new_file_has_been_created_after_old_was_renamed_then_changes_in_new_file
113113fn when_monitored_file_has_been_truncated_then_changes_are_still_monitored ( ) {
114114 let mut file = TestFile :: with_unique_name ( ) ;
115115 let mut auth_file_watcher =
116- AuthFileWatcher :: new ( & file. filepath ) . expect ( "Error creating AuthFileWatcher" ) ;
116+ AuthFileWatcher :: new ( file. path ( ) ) . expect ( "Error creating AuthFileWatcher" ) ;
117117 expect_no_update_callback_call ( & mut auth_file_watcher) ;
118118
119119 file. truncate ( ) ;
0 commit comments