Last active
August 29, 2015 14:06
-
-
Save Atalanta/41d67815fd370190ee78 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| httpd_service 'billpay' do | |
| action :create | |
| listen_ports ['80', '8000] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'spec_helper' | |
| describe 'Billpay Server' do | |
| it 'should run apache on port 8000' do | |
| expect(package 'httpd').to be_installed | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tree test | |
| test | |
| └── integration | |
| └── default | |
| └── serverspec | |
| ├── localhost | |
| │ └── default_spec.rb | |
| └── spec_helper.rb | |
| 4 directories, 2 files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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