Sha256: 8ecb73b0aaa5f386f62a1d8d310aa1e9c160dcdebb7d1138b72351b2fabfa514
Contents?: true
Size: 645 Bytes
Versions: 16
Compression:
Stored size: 645 Bytes
Contents
require File.join(File.dirname(__FILE__), 'test_helper') class HirbTest < Test::Unit::TestCase before(:each) {Hirb.instance_eval "@config = nil"} test "config converts yaml when config file exists" do yaml_data = {:blah=>'blah'} File.stubs('exists?').returns(true) YAML::expects(:load_file).returns(yaml_data) Hirb.config.should == yaml_data end test "config defaults to hash when no config file" do File.stubs('exists?').returns(false) Hirb.config.should == {} end test "config reloads if given explicit reload" do Hirb.config Hirb.expects(:read_config_file) Hirb.config(true) end end
Version data entries
16 entries across 16 versions & 3 rubygems