Skip to content

Instantly share code, notes, and snippets.

@bixu
Last active December 18, 2015 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bixu/9b73da8e7a3a61c1ff72 to your computer and use it in GitHub Desktop.
Save bixu/9b73da8e7a3a61c1ff72 to your computer and use it in GitHub Desktop.
default_spec for docker builds (this one is ubuntu-specific)
require 'spec_helper'
describe "Dockerfile" do
before(:all) do
image = Docker::Image.build_from_dir('.') do |v|
if (log = JSON.parse(v)) && log.has_key?("stream")
$stdout.puts log["stream"]
end
end
set :os, family: :debian
set :backend, :docker
set :docker_image, image.id
end
describe file ('/etc/resolv.conf') do
its(:content) { should match /nameserver/ }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment