master
1describe "stronglifters::rails" do
2 subject do
3 ChefSpec::SoloRunner.new do |node|
4 node.set["stronglifters"]["root_path"] = root_path
5 node.set["stronglifters"]["username"] = username
6 node.set["postgres"]["database"] = "app"
7 node.set["postgres"]["username"] = username
8 node.set["postgres"]["password"] = "password"
9 node.set["postgres"]["host"] = "localhost"
10 node.set["etc"]["passwd"][username]["dir"] = "/home/#{username}"
11 end.converge(described_recipe)
12 end
13 let(:root_path) { "/var/www/#{FFaker::Internet.domain_name}" }
14 let(:shared_path) { File.join(root_path, "shared") }
15 let(:username) { "deployer" }
16
17 before :each do
18 stub_command("stat -c %U #{root_path} | grep root").and_return(nil)
19 end
20
21 it "creates the sharec directory for the application" do
22 expect(subject).to create_directory("#{shared_path}/config")
23 end
24end