Sha256: 1fa9ee245e6ad8fad2cb0ecfacdcbd0146250736f5d8c33e72c20d7048059569
Contents?: true
Size: 722 Bytes
Versions: 3
Compression:
Stored size: 722 Bytes
Contents
require 'test/unit' require 'alfa/config' class AlfaConfigTest < Test::Unit::TestCase def test_01 config = Alfa::Config.new assert config.is_a?(Hash) assert config[:db].is_a?(Hash) assert config[:log].is_a?(Hash) assert_raise RuntimeError do config[:db] = nil end assert_raise RuntimeError do config.store(:db, nil) end assert_raise RuntimeError do config[:log] = nil end assert_raise RuntimeError do config.store(:log, nil) end assert_equal({:db=>{}, :log=>{}, :session=>{:key=>'session', :secret=>nil}}, config) config[:foo] = 1 assert_equal({:db=>{}, :log=>{}, :session=>{:key=>'session', :secret=>nil}, :foo=>1}, config) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
alfa-0.0.8.pre | test/test_config.rb |
alfa-0.0.7.pre | test/test_config.rb |
alfa-0.0.6.pre | test/test_config.rb |