Skip to content

Instantly share code, notes, and snippets.

Created June 25, 2014 05:17
Show Gist options
  • Save anonymous/a919a3897754ede2ef14 to your computer and use it in GitHub Desktop.
Save anonymous/a919a3897754ede2ef14 to your computer and use it in GitHub Desktop.
describe ".get_backup_metrics_per_node" do
it "should return backup metrics configured on a node" do
@test_chef_rest_call.stub(:get_rest => test_chef_node_3)
expect(BACKM::Chef.get_backup_metrics_per_node(test_backup_node_1)).to eql(test_backup_metrics_1)
end
it "should return empty hash when chef server is unavailable" do
@test_chef_rest_call.stub(:get_rest).and_raise(EOFError)
expect(BACKM::Chef.get_backup_metrics_per_node(test_backup_node_1)).to eql({})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment