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

Version Path
Chrononaut-hirb-0.2.1 test/hirb_test.rb
Chrononaut-hirb-0.2.3 test/hirb_test.rb
cldwalker-hirb-0.1.0 test/hirb_test.rb
cldwalker-hirb-0.1.1 test/hirb_test.rb
cldwalker-hirb-0.1.2 test/hirb_test.rb
cldwalker-hirb-0.2.0 test/hirb_test.rb
cldwalker-hirb-0.2.1 test/hirb_test.rb
cldwalker-hirb-0.2.2 test/hirb_test.rb
cldwalker-hirb-0.2.3 test/hirb_test.rb
cldwalker-hirb-0.2.4 test/hirb_test.rb
cldwalker-hirb-0.2.5 test/hirb_test.rb
hirb-0.2.2 test/hirb_test.rb
hirb-0.2.3 test/hirb_test.rb
hirb-0.2.4 test/hirb_test.rb
hirb-0.2.5 test/hirb_test.rb
hirb-0.1.2 test/hirb_test.rb