From 68a2471916bfbe1a4491e92c097f93c38cdaeecc Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 20 Feb 2017 22:24:44 +0100 Subject: [PATCH] Use `alias_matcher` for `fail_with`. --- Library/Homebrew/test/compiler_failure_spec.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/test/compiler_failure_spec.rb b/Library/Homebrew/test/compiler_failure_spec.rb index 81e464a87f..b4fab0b270 100644 --- a/Library/Homebrew/test/compiler_failure_spec.rb +++ b/Library/Homebrew/test/compiler_failure_spec.rb @@ -1,12 +1,8 @@ require "compilers" -describe CompilerFailure do - matcher :fail_with do |expected| - match do |actual| - actual.fails_with?(expected) - end - end +RSpec::Matchers.alias_matcher :fail_with, :be_fails_with +describe CompilerFailure do describe "::create" do it "creates a failure when given a symbol" do failure = described_class.create(:clang)