mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
parent
48d8694789
commit
1f470971d2
2 changed files with 0 additions and 16 deletions
|
@ -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|
|
||||
|
|
|
@ -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
|
Loading…
Reference in a new issue