spec/pgpass.rb in pgpass-2012.01.18 vs spec/pgpass.rb in pgpass-2022.07.27

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'bacon' Bacon.summary_on_exit require_relative '../lib/pgpass' @@ -48,11 +50,11 @@ Pgpass::Entry.create( hostname: ':x::y', port: 'bar:', database: ':d', username: 'u:', - password: 'p', + password: 'p' ) ] end it 'loads a line with \\\\' do @@ -62,19 +64,19 @@ Pgpass::Entry.create( hostname: '\\x\\y', port: 'bar\\', database: '\\d', username: 'u', - password: 'p', + password: 'p' ) ] end end describe '::match' do def with_pgpass(relative_path) location = File.expand_path("../#{relative_path}", __FILE__) - File.chmod(0600, location) + File.chmod(0o600, location) Pgpass::LOCATIONS.unshift(location) yield ensure Pgpass::LOCATIONS.delete(location) end