File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def daemonize
3333unless Dir . singleton_methods . include? ( :exists? )
3434 class Dir
3535 def self . exists? ( file_name )
36- Puppet . warning ( 'exists? is a deprecated name, use exist? instead' )
36+ warn ( 'exists? is a deprecated name, use exist? instead' )
3737 Dir . exist? ( file_name )
3838 end
3939 end
@@ -42,7 +42,7 @@ def self.exists?(file_name)
4242unless File . singleton_methods . include? ( :exists? )
4343 class File
4444 def self . exists? ( file_name )
45- Puppet . warning ( 'exists? is a deprecated name, use exist? instead' )
45+ warn ( 'exists? is a deprecated name, use exist? instead' )
4646 File . exist? ( file_name )
4747 end
4848 end
Original file line number Diff line number Diff line change 1414
1515 if RUBY_VERSION >= '3.2'
1616 it 'logs a warning message' do
17- expect ( Puppet ) . to receive ( :warning ) . with ( 'exists? is a deprecated name, use exist? instead' )
17+ expect ( Dir ) . to receive ( :warn ) . with ( 'exists? is a deprecated name, use exist? instead' )
1818 Dir . exists? ( __dir__ )
1919 end
2020 end
3333
3434 if RUBY_VERSION >= '3.2'
3535 it 'logs a warning message' do
36- expect ( Puppet ) . to receive ( :warning ) . with ( 'exists? is a deprecated name, use exist? instead' )
36+ expect ( File ) . to receive ( :warn ) . with ( 'exists? is a deprecated name, use exist? instead' )
3737 File . exists? ( __FILE__ )
3838 end
3939 end
You can’t perform that action at this time.
0 commit comments