spec/support/shared_matcher_examples.rb in serverspec-0.2.25 vs spec/support/shared_matcher_examples.rb in serverspec-0.2.26
- old
+ new
@@ -348,9 +348,21 @@
it { should_not contain('This is invalid text!!').before(before) }
end
end
end
+shared_examples_for 'support match_md5checksum matcher' do |valid_file, pattern|
+ describe 'match_md5checksum' do
+ describe valid_file do
+ it { should match_md5checksum pattern }
+ end
+
+ describe '/invalid_file' do
+ it { should_not match_md5checksum 'INVALIDMD5CHECKSUM' }
+ end
+ end
+end
+
shared_examples_for 'support be_user matcher' do |valid_user|
describe 'be_user' do
describe valid_user do
it { should be_user }
end