In some cases it's not sufficient to test if a nginx process is running or port 80 is open. There are some cases that before promote a change to production environment we need run some acceptance test.

I have been searching in google how to run some acceptance tests with Chef + Kitchen, and I found infrastaster, a Infraestucture Behavior Testing Framework. And on a project issue I has found a solution to run infrastaster with serverspec.

Next I show how I have implemented my own tests with infrastaster

The serverspec tests there are inside integration/default/serverspec/ directory in the chef-repo.

Create a file integration/default/serverspec/Gemfile

source ''

gem 'infrataster'

Create a file integration/default/serverspec/spec_helper

require 'serverspec'
require 'infrataster/rspec'

set :backend, :exec

Infrataster::Server.define(:app, '')

Create tests

require 'spec_helper'

describe port(80) do
  it { should be_listening.on('').with('tcp') }

describe server(:app) do
  describe http('') do
    it "responds content including 'Shopswey'" do
      expect(response.body).to include('Shopswey')

This test check if port 80 is open, and connect to url to check if the response contains the string Shopswey

After create the test, you can run a kitchen verify to run the test. When you run the kitchen verify, Kitchen install infrastaster on the node.