spec/debian/file_spec.rb in serverspec-0.7.6 vs spec/debian/file_spec.rb in serverspec-0.7.7
- old
+ new
@@ -33,9 +33,14 @@
it { should contain 'This is the sshd server system-wide configuration file' }
its(:command) { should eq "grep -q -- This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
end
describe file('/etc/ssh/sshd_config') do
+ it { should contain /^This is the sshd server system-wide configuration file/ }
+ its(:command) { should eq "grep -q -- \\^This\\ is\\ the\\ sshd\\ server\\ system-wide\\ configuration\\ file /etc/ssh/sshd_config" }
+end
+
+describe file('/etc/ssh/sshd_config') do
it { should_not contain 'This is invalid text!!' }
end
describe file('Gemfile') do
it { should contain('rspec').from(/^group :test do/).to(/^end/) }