Sha256: 17165b31b7cd90add23c69f342153f422af8ef720f61c9e1dae1805e50b768d7
Contents?: true
Size: 1.74 KB
Versions: 1
Compression:
Stored size: 1.74 KB
Contents
require 'spec_helper' describe ActiveGit::Configuration do before :each do @working_path = ActiveGit.configuration.working_path @bare_path = ActiveGit.configuration.bare_path @logger = ActiveGit.configuration.logger end after :each do ActiveGit.configuration.working_path = @working_path ActiveGit.configuration.bare_path = @bare_path ActiveGit.configuration.logger = @logger end it 'default sync_batch_size' do ActiveGit.configuration.sync_batch_size.should eq 10000 end it 'set sync_batch_size' do ActiveGit.configuration.sync_batch_size = 100 ActiveGit.configuration.sync_batch_size.should eq 100 end it 'set working_path with string' do ActiveGit.configuration.working_path = "/path_to_test" ActiveGit.configuration.working_path.should eq "/path_to_test" end it 'set working_path with block' do ActiveGit.configuration.working_path = lambda do path_home = '/home' "#{path_home}/path_to_test" end ActiveGit.configuration.working_path.should eq "/home/path_to_test" end it 'set bare_path with string' do ActiveGit.configuration.bare_path = "/path_to_test" ActiveGit.configuration.bare_path.should eq "/path_to_test" end it 'set bare_path with block' do ActiveGit.configuration.bare_path = lambda do path_home = '/home' "#{path_home}/path_to_test" end ActiveGit.configuration.bare_path.should eq "/home/path_to_test" end it 'get default logger' do ActiveGit.configuration.logger.should be_a Logger end it 'set logger' do logger = Logger.new($stdout) ActiveGit.configuration.logger.should_not eq logger ActiveGit.configuration.logger = logger ActiveGit.configuration.logger.should eq logger end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_git-0.0.7 | spec/configuration_spec.rb |