Sha256: e38e9415a416fa0aaa6642c1f113e836fb157fa95e8f329251695c2194d272c5
Contents?: true
Size: 936 Bytes
Versions: 3
Compression:
Stored size: 936 Bytes
Contents
require 'spec_helper' describe Fozzie::Configuration do it "#host" do subject.host.should be_kind_of(String) end it "#port" do subject.port.should be_kind_of(Fixnum) end 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' end it "defaults env" do subject.env.should == 'development' end it "creates a data prefix" do 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' end it "handles missing configuration namespace" do proc { Fozzie::Configuration.new({:env => 'blbala', :config_path => 'spec/'}) }.should_not raise_error end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fozzie-0.0.5 | spec/lib/fozzie/configuration_spec.rb |
fozzie-0.0.4 | spec/lib/fozzie/configuration_spec.rb |
fozzie-0.0.3 | spec/lib/fozzie/configuration_spec.rb |