27. require 'person'
!
describe Person, "#say" do
it "should say something" do
bob = Person.new
bob.say("hello").should
eq("hello everyone")
end
end
Gareth Rushgrove
28. Now lets run our test.
It should fail
Gareth Rushgrove
95. context 'default parameters' do
it 'should work with no errors' do
pp = “class { 'sample': }”
!
expect(apply_manifest(pp).exit_code).to_not eq(1)
end
end
Gareth Rushgrove
97. context 'default parameters' do
it 'should work with no errors' do
pp = “class { 'sample': }”
!
expect(apply_manifest(pp).exit_code).to_not eq(1)
expect(apply_manifest(pp).exit_code).to eq(0)
end
end
Gareth Rushgrove
98. Test that the module
installs packages, run
services, etc.
Gareth Rushgrove
100. describe package('nginx') do
it { should be_installed }
end
!
describe service('nginx') do
it { should be_enabled }
it { should be_running }
end
!
describe port(80) do
it { should be_listening}
end
Gareth Rushgrove