From 262666c82858bfd00b98dd136cbe09d705c73862 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 28 Mar 2018 11:20:37 +0100 Subject: [PATCH] cleanup_spec: add nicer prune matcher alias. --- Library/Homebrew/test/cleanup_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/test/cleanup_spec.rb b/Library/Homebrew/test/cleanup_spec.rb index 60472fa5ff..9ec3a30479 100644 --- a/Library/Homebrew/test/cleanup_spec.rb +++ b/Library/Homebrew/test/cleanup_spec.rb @@ -260,6 +260,8 @@ describe Homebrew::Cleanup do end describe "::prune?" do + alias_matcher :be_pruned, :be_prune + before do foo.mkpath end @@ -268,11 +270,11 @@ describe Homebrew::Cleanup do it "returns true when path_modified_time < days_default" do allow_any_instance_of(Pathname).to receive(:mtime).and_return(Time.now - sec_in_a_day * 2) - expect(described_class).to be_prune(foo, days_default: "1") + expect(described_class).to be_pruned(foo, days_default: "1") end it "returns false when path_modified_time >= days_default" do - expect(described_class).not_to be_prune(foo, days_default: "2") + expect(described_class).not_to be_pruned(foo, days_default: "2") end end end