spec/lib/fozzie/configuration_spec.rb in fozzie-0.0.2 vs spec/lib/fozzie/configuration_spec.rb in fozzie-0.0.3
- old
+ new
@@ -13,22 +13,26 @@
it "attempts to load configuration from yaml" do
c = Fozzie::Configuration.new({:env => 'test', :config_path => 'spec/'})
c.host.should == '1.1.1.1'
c.port.should == 9876
c.appname.should == 'fozzie'
- c.data_prefix.should == 'fozzie.test.'
+ c.data_prefix.should == 'fozzie.test'
end
it "defaults env" do
subject.env.should == 'development'
end
it "creates a data prefix" do
- subject.data_prefix.should == 'development.'
+ subject.data_prefix.should == 'development'
end
it "creates a data prefix with appname when set" do
subject.appname = 'astoria'
- subject.data_prefix.should == 'astoria.development.'
+ subject.data_prefix.should == 'astoria.development'
+ end
+
+ it "handles missing configuration namespace" do
+ proc { Fozzie::Configuration.new({:env => 'blbala', :config_path => 'spec/'}) }.should_not raise_error
end
end
\ No newline at end of file