spec/engineyard/config_spec.rb in engineyard-2.1.3 vs spec/engineyard/config_spec.rb in engineyard-2.2.0.rc1
- old
+ new
@@ -12,9 +12,14 @@
it "are present when the config file has no environments key" do
write_yaml({}, 'ey.yml')
EY::Config.new.environments.should == {}
end
+
+ it "rases an error when yaml produces an unexpected result" do
+ File.open('ey.yml', "w") {|f| f << "this isn't a hash" }
+ expect { EY::Config.new }.to raise_error(RuntimeError, "ey.yml load error: Expected a Hash but a String was returned.")
+ end
end
describe "endpoint" do
it "defaults to production Engine Yard Cloud" do
EY::Config.new.endpoint.should == EY::Config.new.default_endpoint