Sha256: f1986f2a2a9c0c692a1916ae4d070dc4aaee98618b6ec163f29a6442231bb91c
Contents?: true
Size: 791 Bytes
Versions: 4
Compression:
Stored size: 791 Bytes
Contents
require File.join(File.dirname(__FILE__), 'test_helper') class Boson::RepoTest < Test::Unit::TestCase context "config" do before(:all) { reset } before(:each) { @repo = Boson::Repo.new(File.dirname(__FILE__)) } test "reloads config when passed true" do @repo.config.object_id.should_not == @repo.config(true).object_id end test "reads existing config correctly" do expected_hash = {:commands=>{'c1'=>{}}, :libraries=>{}} File.expects(:exists?).returns(true) YAML.expects(:load_file).returns(expected_hash) @repo.config[:commands]['c1'].should == {} end test "ignores nonexistent file and sets config defaults" do assert @repo.config[:command_aliases].is_a?(Hash) && @repo.config[:libraries].is_a?(Hash) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
boson-0.2.3 | test/repo_test.rb |
boson-0.2.2 | test/repo_test.rb |
boson-0.2.1 | test/repo_test.rb |
boson-0.2.0 | test/repo_test.rb |