Skip to content

Instantly share code, notes, and snippets.

@Atalanta
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save Atalanta/41d67815fd370190ee78 to your computer and use it in GitHub Desktop.

Select an option

Save Atalanta/41d67815fd370190ee78 to your computer and use it in GitHub Desktop.
httpd_service 'billpay' do
action :create
listen_ports ['80', '8000]
end
require 'serverspec'
require 'pathname'
include Serverspec::Helper::Exec
include Serverspec::Helper::DetectOS
RSpec.configure do |c|
c.before :all do
c.os = backend(Serverspec::Commands::Base).check_os
end
end
require 'spec_helper'
describe 'Billpay Server' do
it 'should run apache on port 8000' do
expect(package 'httpd').to be_installed
end
end
tree test
test
└── integration
└── default
└── serverspec
├── localhost
│   └── default_spec.rb
└── spec_helper.rb
4 directories, 2 files
require 'chefspec'
require 'chefspec/berkshelf'
RSpec.configure do |config|
config.platform = 'centos'
config.version = '6.4'
describe 'billpay::default' do
let(:chef_run) { ChefSpec::Runner.new.converge(described_recipe) }
it 'includes the default httpd recipe' do
expect(chef_run).to include_recipe 'httpd'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment