spec/hue/config/application_spec.rb in hue-lib-0.7.1 vs spec/hue/config/application_spec.rb in hue-lib-0.7.2
- old
+ new
@@ -56,6 +56,17 @@
config.delete
YAML.load_file(described_class.file_path)['not_default'].should be_nil
end
end
+ context 'given an non existing config' do
+
+ it "should throw and error if a named config doesn't exist" do
+ described_class.expects(:file_path).returns(EMPTY_CONFIG_FILE).once
+
+ lambda do
+ described_class.named('not_default')
+ end.should raise_error(Hue::Config::NotFound, /Config named (.*) not found/)
+ end
+ end
+
end