spec/support/shared_matcher_examples.rb in serverspec-0.0.17 vs spec/support/shared_matcher_examples.rb in serverspec-0.0.18

- old
+ new

@@ -3,11 +3,11 @@ describe 'be_enabled' do describe valid_service do it { should be_enabled } end - describe 'this-is-dummy-service' do + describe 'this-is-invalid-service' do it { should_not be_enabled } end end end @@ -15,11 +15,11 @@ describe 'be_installed' do describe valid_package do it { should be_installed } end - describe 'this-is-dummy-package' do + describe 'this-is-invalid-package' do it { should_not be_installed } end end end @@ -27,11 +27,11 @@ describe 'be_running' do describe valid_service do it { should be_running } end - describe 'this-is-dummy-daemon' do + describe 'this-is-invalid-daemon' do it { should_not be_running } end end end @@ -39,11 +39,11 @@ describe 'be_listening' do describe "port #{ valid_port }" do it { should be_listening } end - describe 'port 9999' do + describe 'port invalid' do it { should_not be_listening } end end end @@ -51,11 +51,11 @@ describe 'be_file' do describe valid_file do it { should be_file } end - describe '/etc/thid_is_dummy_file' do + describe '/etc/thid_is_invalid_file' do it { should_not be_file } end end end @@ -63,11 +63,11 @@ describe 'be_directory' do describe valid_directory do it { should be_directory } end - describe '/etc/thid_is_dummy_directory' do + describe '/etc/thid_is_invalid_directory' do it { should_not be_directory } end end end @@ -76,22 +76,22 @@ describe valid_file do it { should contain pattern } end describe '/etc/ssh/sshd_config' do - it { should_not contain 'This is duymmy text!!' } + it { should_not contain 'This is invalid text!!' } 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 - describe 'i_am_dummy_user' do + describe 'i_am_invalid_user' do it { should_not be_user } end end end @@ -99,11 +99,11 @@ describe 'be_group' do describe valid_group do it { should be_group } end - describe 'we_are_dummy_group' do + describe 'we_are_invalid_group' do it { should_not be_group } end end end @@ -112,11 +112,11 @@ describe valid_file do it { should be_mode mode } end describe '/etc/passwd' do - it { should_not be_mode 000 } + it { should_not be_mode 'invalid' } end end end shared_examples_for 'support be_owned_by matcher' do |valid_file, owner| @@ -124,11 +124,11 @@ describe valid_file do it { should be_owned_by owner } end describe '/etc/passwd' do - it { should_not be_owned_by 'daemon' } + it { should_not be_owned_by 'invalid-owner' } end end end shared_examples_for 'support be_grouped_into matcher' do |valid_file, group| @@ -136,11 +136,11 @@ describe valid_file do it { should be_grouped_into group } end describe '/etc/passwd' do - it { should_not be_grouped_into 'daemon' } + it { should_not be_grouped_into 'invalid-group' } end end end shared_examples_for 'support have_cron_entry matcher' do |title, entry| @@ -148,11 +148,11 @@ describe title do it { should have_cron_entry entry } end describe '/etc/passwd' do - it { should_not have_cron_entry 'dummy entry' } + it { should_not have_cron_entry 'invalid entry' } end end end shared_examples_for 'support have_cron_entry.with_user matcher' do |title, entry, user| @@ -160,11 +160,11 @@ describe title do it { should have_cron_entry(entry).with_user(user) } end describe '/etc/passwd' do - it { should_not have_cron_entry('dummy entry').with_user('dummyuser') } + it { should_not have_cron_entry('dummy entry').with_user('invaliduser') } end end end shared_examples_for 'support be_linked_to matcher' do |file, target| @@ -172,22 +172,22 @@ describe file do it { should be_linked_to target } end describe 'this-is-dummy-link' do - it { should_not be_linked_to 'dummy target' } + it { should_not be_linked_to '/invalid/target' } end end end shared_examples_for 'support be_installed_by_gem matcher' do |name| describe 'be_installed_by_gem' do describe name do it { should be_installed_by_gem } end - describe 'dummygem' do + describe 'invalid-gem' do it { should_not be_installed_by_gem } end end end @@ -196,21 +196,21 @@ describe name do it { should be_installed_by_gem.with_version(version) } end describe name do - it { should_not be_installed_by_gem.with_version('dummyversion') } + it { should_not be_installed_by_gem.with_version('invalid-version') } end end end -shared_examples_for 'support belong_to_group matcher' do |name, group| +shared_examples_for 'support belong_to_group matcher' do |user, group| describe 'belong_to_group' do describe user do it { should belong_to_group group } end describe 'dummyuser' do - it { should_not belong_to_group 'dummygroup' } + it { should_not belong_to_group 'invalid-group' } end end end