Created
February 7, 2014 15:13
-
-
Save borntyping/8864591 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "fauxhai" do | |
before { Fauxhai.mock(platform: "centos", version: "6.4") } | |
let(:chef_run) { ChefSpec::Runner.new.converge() } | |
it "sets the platform correctly" do | |
expect(chef_run.node["platform"]).to eq("centos") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rspec | |
fauxhai | |
sets the platform correctly (FAILED - 1) | |
Failures: | |
1) fauxhai sets the platform correctly | |
Failure/Error: expect(chef_run.node["platform"]).to eq("centos") | |
expected: "centos" | |
got: "chefspec" | |
(compared using ==) | |
# ./spec/spec_helpers.rb:20:in `block (2 levels) in <top (required)>' | |
Finished in 0.29133 seconds | |
1 example, 1 failure | |
Failed examples: | |
rspec ./spec/spec_helpers.rb:19 # fauxhai sets the platform correctly | |
Command rspec --fail-fast exited with code 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment