master
 1describe "stronglifters::aws" do
 2  subject do
 3    ChefSpec::SoloRunner.new do |node|
 4      node.set["stronglifters"]["username"] = username
 5      node.set["etc"]["passwd"][username]["dir"] = "/home/#{username}"
 6    end.converge(described_recipe)
 7  end
 8
 9  let(:username) { FFaker::Internet.user_name }
10
11  it "installs python-ip" do
12    expect(subject).to install_package("python-pip")
13  end
14
15  it "installs awscli" do
16    expect(subject).to run_execute("pip install awscli")
17  end
18
19  it "installs the config file" do
20    expect(subject).to create_template("/home/#{username}/.aws/config")
21  end
22
23  it "installs the credentials file" do
24    expect(subject).to create_template("/home/#{username}/.aws/credentials")
25  end
26end