spec/config_spec.rb in rock_config-0.0.5 vs spec/config_spec.rb in rock_config-0.0.6
- old
+ new
@@ -25,21 +25,34 @@
it "returns nil when asked for non existing environment" do
config = Config.new({})
config.for_environment("I do not exist").should be_nil
end
- it "returns correct values when asked for" do
+ it "returns correct values" do
hash = {
"development" => {
"host" => "localhost"
}
}
config = Config.new(hash)
config.development.host.should eq("localhost")
end
- it "returns correct nested values when asked for" do
+ it "returns correct boolean values" do
+ hash = {
+ "development" => {
+ "test_mode" => true,
+ "computer_says" => false
+ }
+ }
+
+ config = Config.new(hash)
+ config.development.test_mode.should == true
+ config.development.computer_says.should == false
+ end
+
+ it "returns correct nested values" do
hash = {
"development" => {
"elastic" => {
"host" => "localhost"
}