spec/support/shared_matcher_examples.rb in serverspec-0.2.1 vs spec/support/shared_matcher_examples.rb in serverspec-0.2.2
- old
+ new
@@ -303,5 +303,29 @@
describe command do
it { should_not get_stdout 'invalid-output' }
end
end
+
+shared_examples_for 'support be_zfs matcher' do |zfs|
+ describe 'be_zfs' do
+ describe zfs do
+ it { should be_zfs }
+ end
+
+ describe 'this-is-invalid-zfs' do
+ it { should_not be_zfs }
+ end
+ end
+end
+
+shared_examples_for 'support be_zfs.property matcher' do |zfs, property|
+ describe 'be_zfs' do
+ describe zfs do
+ it { should be_zfs.with(property) }
+ end
+
+ describe 'this-is-invalid-zfs' do
+ it { should_not be_zfs.with(property) }
+ end
+ end
+end