Skip to content

Instantly share code, notes, and snippets.

@nicgrayson
Created December 18, 2013 18:58
Show Gist options
  • Select an option

  • Save nicgrayson/8027788 to your computer and use it in GitHub Desktop.

Select an option

Save nicgrayson/8027788 to your computer and use it in GitHub Desktop.
require 'serverspec'
include Serverspec::Helper::Exec
include Serverspec::Helper::DetectOS
describe "nginx" do
it "should listen on port 80" do
expect(port(80)).to be_listening
end
it 'should be running as a daemon' do
expect(service('nginx')).to be_running
end
it 'should create the correct site files' do
expect(file('/etc/nginx/sites-enabled/assets-default.banno.com')).to be_linked_to '/etc/nginx/sites-available/assets-default.banno.com'
expect(file('/etc/nginx/sites-available/assets-default.banno.com')).to contain 'assets-default.banno.com'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment