From 1f470971d28e1a3978324c2e7de9205719a35a38 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Wed, 11 May 2016 14:42:49 +0200 Subject: [PATCH] Revert "Add all_match to matchers" This reverts commit 29cf4522e43afa513ce1083510f5b615a1b0cba1. --- lib/matchers/matchers.rb | 7 ------- test/integration/default/matcher.rb | 9 --------- 2 files changed, 16 deletions(-) delete mode 100644 test/integration/default/matcher.rb diff --git a/lib/matchers/matchers.rb b/lib/matchers/matchers.rb index bfa6eccbb..de41c0ebf 100644 --- a/lib/matchers/matchers.rb +++ b/lib/matchers/matchers.rb @@ -74,13 +74,6 @@ RSpec::Matchers.define :contain_legacy_plus do end end -# matcher to check that all entries match the regex -RSpec::Matchers.define :all_match do |regex| - match do |arr| - arr.all? { |element| element.match(regex) } - end -end - # verifies that no entry in an array contains a value RSpec::Matchers.define :contain_match do |regex| match do |arr| diff --git a/test/integration/default/matcher.rb b/test/integration/default/matcher.rb deleted file mode 100644 index 23cd558ca..000000000 --- a/test/integration/default/matcher.rb +++ /dev/null @@ -1,9 +0,0 @@ -# encoding: utf-8 - -describe ['ananas', 'apples', 'oranges', 'air', 'alot'] do - it { should all_match /[a]./} -end - -describe ['ananas', 'apples', 'oranges', 'air', 'melons'] do - it { should_not all_match /[a]./} -end