summaryrefslogtreecommitdiff
path: root/kitchen-tests/cookbooks/audit_test/recipes/serverspec_collision.rb
blob: 70109d84b8abf54e57879d6633fcd4ef9e224c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#
# Cookbook Name:: audit_test
# Recipe:: serverspec_collision
#
# Copyright (c) 2014 The Authors, All Rights Reserved.

file "/tmp/audit_test_file" do
  action :create
  content "Welcome to audit mode."
end

controls "file auditing" do
  describe "test file" do
    it "says welcome" do
      expect(file("/tmp/audit_test_file")).to contain("Welcome")
    end
  end
end

file "/tmp/audit_test_file_2" do
  action :create
  content "Bye to audit mode."
end

controls "end file auditing" do
  describe "end file" do
    it "says bye" do
      expect(file("/tmp/audit_test_file_2")).to contain("Bye")
    end
  end
end