diff --git a/spec/homebrew/commands/list_spec.rb b/spec/homebrew/commands/list_spec.rb index 4dc550bf0..3d250903e 100644 --- a/spec/homebrew/commands/list_spec.rb +++ b/spec/homebrew/commands/list_spec.rb @@ -21,7 +21,7 @@ it "succeeds with list" do out = "Name Status User File\nservice started user /dev/null\n" - formula = OpenStruct.new(name: "service", user: "user", status: :started, file: +"/dev/null", loaded: true) + formula = OpenStruct.new(name: "service", user: "user", status: :started, file: +File::NULL, loaded: true) expect(Service::Formulae).to receive(:services_list).and_return([formula]) expect do described_class.run diff --git a/spec/homebrew/formula_wrapper_spec.rb b/spec/homebrew/formula_wrapper_spec.rb index 0f7901477..ceefeac0b 100644 --- a/spec/homebrew/formula_wrapper_spec.rb +++ b/spec/homebrew/formula_wrapper_spec.rb @@ -139,7 +139,7 @@ it "false if opt_prefix missing" do allow(service).to receive_messages(installed?: true, - service_file: Pathname.new("/dev/null"), + service_file: Pathname.new(File::NULL), formula: OpenStruct.new(plist: nil, opt_prefix: Pathname.new("/dfslkfhjdsolshlk"))) expect(service.plist?).to be(false)